Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drbarnabus/pullrequest-automation
GitHub Pull Request process and task automation
https://github.com/drbarnabus/pullrequest-automation
automation bot branch github github-actions label labeller labels protection pull-request pull-requests
Last synced: 7 days ago
JSON representation
GitHub Pull Request process and task automation
- Host: GitHub
- URL: https://github.com/drbarnabus/pullrequest-automation
- Owner: DrBarnabus
- License: mit
- Created: 2022-08-30T17:26:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-20T13:52:32.000Z (almost 2 years ago)
- Last Synced: 2024-12-06T22:42:04.714Z (27 days ago)
- Topics: automation, bot, branch, github, github-actions, label, labeller, labels, protection, pull-request, pull-requests
- Language: TypeScript
- Homepage:
- Size: 1.04 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DrBarnabus/pullrequest-automation Action
#### GitHub Pull Request process and task automationA GitHub Action to automate a number of common pull request processes/tasks in a GitHub Repository.
## Example Configuration
`.github/pullrequest-automation.yml'
```yaml
modules:
approvalLabeller:
enabled: true
requiredApprovals: 1
labelsToApply:
approved: approved
rejected: rejected
needsReview: needs-review
draft: still-in-progress # optional
branchLabeller:
enabled: true
rules:
- baseRef: main
headRef: development # optional
labelToApply: development-to-main
- baseRef: release/.* # Regular Expression Supported
headRef: feature/.* # Regular Expression Supported
reviewerExpander:
enabled: true
commands:
mergeSafety:
enabled: true
triggers: # single or list
- Safe to merge? # default if no specified
branchesToProtect:
- baseRef: development
comparisonBaseRef: main
comparisonHeadRef: development
```## Recommended Workflow Setup
`.github/workflows/pullrequest-automation.yml`
```yaml
name: Pull Request Automation
on:
pull_request_target:
types: [labelled, unlabelled, opened, edited, reopened, synchronize, converted_to_draft, ready_for_review, review_requested]
pull_request_review:
types: [submitted, edited, dismissed]
issue_comment:
types: [created]jobs:
process:
name: Process
runs-on: ubuntu-latest
steps:
- uses: DrBarnabus/pullrequest-automation@v3 # latest matching major version 'v3' or specific version 'v2.4.1' or branch 'main'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
config-ref: main```
### Workflow Parameters
- __github-token__ - The GitHub API Token, for example `${{ secrets.GITHUB_TOKEN }}` when not using GitHub App Impersonation.
- __github-app-id__ - When using GitHub App Impersonation this must be the ID of the GitHub App provided during registration.
- __github-app-key__ - When using GitHub App Impersonation this must be a base64 encoded PEM key file with the secret generated for the GitHub App.
- __config-path__ - Optional override for the path to the config file. Defaults to `.github/pullrequest-automation.yml`
- __config-ref__ - Optional override for the branch/tag/commit to load the config from. Recommended to set to `main` but defaults to the commit in the PR if not set.### Label Sync
It's strongly recommended especially if configuring for multiple repos to make use of [label-sync](https://github.com/DrBarnabus/label-sync) to quickly and easily create/manage labels via a configuration file in the repo.
## v3 Breaking Changes
See [v3-CHANGES](./v3-CHANGES.md)
# License
Licensed under [MIT](./LICENSE)
Copyright (c) 2022 DrBarnabus