Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulo9mv/announcement_pull_request
Github Action that adds a custom comment in all open pull requests
https://github.com/paulo9mv/announcement_pull_request
Last synced: 4 days ago
JSON representation
Github Action that adds a custom comment in all open pull requests
- Host: GitHub
- URL: https://github.com/paulo9mv/announcement_pull_request
- Owner: paulo9mv
- License: mit
- Created: 2023-08-23T14:48:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-07T02:22:57.000Z (about 1 month ago)
- Last Synced: 2025-01-07T02:41:35.294Z (about 1 month ago)
- Language: Shell
- Size: 543 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Announcement Pull Request GitHub Action π’
A GitHub Action to add a comment to all open Pull Requests in a repository.

## Description
This action adds a custom comment to all open Pull Requests (PRs) in a repository. It is useful, for example, to notify developers about updates or important events directly in PRs.
## How to Use
To use this action in your repository, add the following to your `.github/workflows/.yml` file:
```yaml
name: Add PR Commenton:
pull_request:
types: [opened, synchronize, reopened]jobs:
add-pr-comment:
runs-on: ubuntu-lateststeps:
- name: Add comment to PR
uses: paulo9mv/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
message: "Hey everyone, code review is always welcome!"
```### Input Parameters
token (required): The GitHub token to authenticate the action. Use ${{ secrets.GITHUB_TOKEN }} to allow the action to interact with the repository.
message (required): The message that will be posted on the PRs.### Permissions
The GITHUB_TOKEN has limited permissions by default, and you may need to configure them to ensure the action can add comments to PRs.If you are using the action in your repository and the action cannot add comments, add the following to your workflow.yml file, inside the job that uses the action:
```yaml
permissions:
issues: write # Permission to add and modify comments on issues and PRs
pull-requests: write # Permission to add comments on pull requests
```
These permissions will ensure that the action has access to interact with PRs.### Example Workflow
Hereβs a complete example of a workflow that adds a comment to all PRs when thereβs a new update:```yaml
name: Add Comment to PRson:
pull_request:
types: [opened, synchronize, reopened]jobs:
add-pr-comment:
runs-on: ubuntu-latestpermissions:
issues: write
pull-requests: writesteps:
- name: Checkout code
uses: actions/checkout@v2- name: Add comment to PR
uses: paulo9mv/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
message: "Hey everyone, code review is always welcome!"
```## Contributions π€©
If you have suggestions or improvements for this action, feel free to open a Pull Request or Issue.## License
Distributed under the MIT License. See the LICENSE file for more details.## Made in π§π·