https://github.com/codeinwp/gha-pr-check-helper
Allows you to run a job that will check if all checklist items from a PR are solved and label the PR accordingly.
https://github.com/codeinwp/gha-pr-check-helper
Last synced: 5 days ago
JSON representation
Allows you to run a job that will check if all checklist items from a PR are solved and label the PR accordingly.
- Host: GitHub
- URL: https://github.com/codeinwp/gha-pr-check-helper
- Owner: Codeinwp
- License: mit
- Created: 2023-03-10T16:27:12.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T17:29:47.000Z (about 1 year ago)
- Last Synced: 2024-10-14T13:32:34.640Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 424 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pull Request Checklist Helper
Ensure that any checklists pull request body is completed, and add labels to the pull request.
---
## Usage
Create a file named `.github/workflows/checklist-helper.yml` (or any name in that directory) with the following contents:
```yaml
name: Require Checklist Helper
on:
pull_request:
types: [opened, edited, synchronize, labeled, unlabeled]
issues: # optional - if you want to use this action on issues
types: [opened, edited, deleted]
jobs:
job1:
runs-on: ubuntu-latest
steps:
- uses: preda-bogdan/gha-pr-check-helper@master
with:
requireChecklist: false # If this is true and there are no checklists detected, the action will fail
onlyCheckBody: true # If this is true, the action will only check the body of the pull request, else comments will also trigger
completedLabel: "checklist-completed" # This is the default you can use your own.
incompleteLabel: "checklist-incomplete" # This is the default you can use your own.
skipLabel: "allow-checklist-skip" # This is the default you can use your own. This label will skip the checklist check and mark the test as a pass.
allowStrikeThrough: false # If this is true, the action will allow strike through items in the checklist to be counted as resolved/optional.
```### Other notes:
In case there are some items that are not applicable in given checklist
they can be ~stroked through~ and this action will ignore them, the default behaviour is to check strike through items, but this can be enabled/disabled by setting `allowStrikeThrough` to `true`/`false` in the action configuration.The types: `labeled` and `unlabeled` are only required if using the `skipLabel` else you can remove them.