Skip to content

Commit

Permalink
Update readme and package description
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-z committed Apr 2, 2020
1 parent 10be23f commit 966bbbd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
# Comment Pull Request - GitHub Actions
# Comment on Issues - GitHub Actions

A GitHub action that comments with a given message the pull request linked to the pushed branch.
A GitHub action that comments on issues with a given message.
You can even put dynamic data thanks to [Contexts and expression syntax](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions).

## Usage

```
on: pull_request
name: issue-checklist
on:
issues:
types: [opened]
jobs:
example_comment_pr:
comment:
runs-on: ubuntu-latest
name: An example job to comment a PR
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Comment PR
uses: thollander/actions-comment-pull-request@master
with:
message: 'Example of message !'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ben-z/[email protected]
with:
message: "Gentle reminder:\n* Did you go through all of the troubleshooting steps outlined in README.md?"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

See examples in [opened PR](https://github.com/thollander/actions-comment-pull-request/pulls) !

:information_source: : Make sure to listen to `pull_request` events.
Otherwise, it will not be able to comment the PR and you'll have an error.

## Contributing

### Build
Expand All @@ -37,4 +32,4 @@ It is handled by Typescript compiler.

```sh
$ npm run build
```
```
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"name": "actions-comment-pull-request",
"version": "1.0.0",
"description": "GitHub action for commenting pull-request",
"name": "actions-comment-on-issue",
"version": "1.0.2",
"description": "GitHub action for commenting on issues",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/thollander/actions-comment-pull-request"
"url": "git+https://github.com/ben-z/actions-comment-on-issue.git"
},
"keywords": [
"actions",
"container",
"pull-request",
"issue",
"comment",
"message"
],
"author": "Térence Hollander",
"author": "Ben Zhang and Térence Hollander",
"license": "MIT",
"bugs": {
"url": "https://github.com/thollander/actions-comment-pull-request/issues"
"url": "https://github.com/ben-z/actions-comment-on-issue/issues"
},
"homepage": "https://github.com/thollander/actions-comment-pull-request#readme",
"homepage": "https://github.com/ben-z/actions-comment-on-issue",
"dependencies": {
"@actions/core": "^1.0.0",
"@actions/io": "^1.0.0",
Expand Down

0 comments on commit 966bbbd

Please sign in to comment.