Skip to content

Commit

Permalink
Merge pull request #6 from phulsechinmay/custom-PR-number
Browse files Browse the repository at this point in the history
Added PR Number overriding
  • Loading branch information
phulsechinmay authored Sep 22, 2020
2 parents 359f573 + b8ce4c4 commit a1b0419
Show file tree
Hide file tree
Showing 6 changed files with 23,448 additions and 23,447 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-action-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- uses: ./
with:
message: |
Testing workflow commenting
Workflow test comment
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rewritable-pr-comment

Github Action that posts a PR comment that re-writes itself on update
Github Action that posts a PR / issue comment that re-writes itself on update

## Inspiration

Expand All @@ -23,15 +23,14 @@ jobs:
message: ${{ steps.ci-tests.output.message }} # Print the output message from a step that tests something
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
COMMENT_IDENTIFIER: "test-output-comment-rewritable-action" # Put some identifier here that will be unique among comments in the PR


```
## Configuration options
| Variable or Argument | Location | Description | Required |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | -------- |
| message | with | The message you'd like to be displayed, supports Markdown, HTML and Unicode | yes |
| GITHUB_TOKEN | with | A valid GitHub token, either the temporary token GitHub provides or a personal access token | yes |
| COMMENT_IDENTIFIER | with | This will be used to identify the comment that is to be overwritten. You could put some random strings here or just describe what the comment will contain. Check usage for example. | kinda? (Only needed when using the bot for multiple PR workflows.) |
| message | with | The message to be displayed in the comment, supports Markdown, HTML and Unicode. | yes |
| GITHUB_TOKEN | with | A valid GitHub token, either the temporary token GitHub provides or a personal access token. | yes |
| COMMENT_IDENTIFIER | with | This will be used to identify the comment that is to be overwritten. You could put some random strings here or just describe what the comment will contain. Check usage for example. | no (Only needed when using the bot for multiple PR workflows). |
| ISSUE_ID | with | Identifier for the PR / issue the comment should be made on. Defaults to the PR the workflow / action is running on. | no |
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: 'Rewritable Pull Request Comment'
name: 'Rewritable Pull Request / Issue Comment'
branding:
icon: 'message-circle'
color: 'red'
description: 'Posts a PR comment that re-writes itself on an update'
description: 'Posts a PR / issue comment that re-writes itself on an update'
inputs:
GITHUB_TOKEN:
description: 'Github token of the repository (automatically created by Github)'
required: true
COMMENT_IDENTIFIER:
description: 'A unique identifier for the re-writable comment (can be the purpose of the comment)'
ISSUE_ID:
description: 'The identifier for a PR / issue that the comment should be made on. Defaults to the PR that the workflow is running on'
message:
description: 'Message that should be printed in the pull request'
required: true
Expand Down
Loading

0 comments on commit a1b0419

Please sign in to comment.