mtfoley/PR Compliance Action
Action to check PR compliance on various aspects to improve maintainer QOL.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Sep 25, 2023
- License
- MIT
- Runtime
- Deprecated runtime
Pinned Snippet
uses: mtfoley/pr-compliance-action@b40d80a07ff378b69da0c4c1d7d2b4c2b638d080 # v1.3.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| repo-token | Repo Access Token | no | ${{ github.token }} |
| ignore-authors | PR Authors to ignore (e.g. dependabot). All checks will be skipped and action outputs will be set to true if the PR has one of these authors. | yes | dependabot dependabot[bot] |
| ignore-team-members | Whether to ignore in the case that the PR author is a) the owner of repository, or b) has a public membership in the org that owns the repository. If set to true and either of these cases are satisfied, all checks will be skipped and action outputs will be set to true. | yes | true |
| base-comment | Preamble portion to have on any comments made by the action. Because multiple checks are run, the action may have multiple sections to any generated comment. | yes | # PR Compliance Checks Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section. |
| body-regex | PR Body Regex | yes | (fix(es|ed)?|((resolve|close)(s|d)?)) ((https:\/\/github.com\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+\/issues\/d*[1-9]d*?)|(#d*[1-9]d*?)) |
| body-fail | Whether to trigger a failing check when the body-regex is not matched in the PR body. | yes | false |
| body-auto-close | Whether or not to auto-close on failed check of PR Body | yes | true |
| body-comment | Comment to leave on PR on failed check of PR Body | yes | ## Issue Reference In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our Contributing Guide. We are closing this pull request for now but you can update the pull request description and reopen the pull request. The check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address. |
| issue-labels | Label(s) to verify are present on linked issue, e.g. "accepting PRs". Each line in this input corresponds to a label, and all labels specified must be present for the check to pass. | — | "" |
| issue-labels-auto-close | Whether to auto-close on failed check of required issue labels | yes | true |
| issue-labels-comment | Comment to leave on PR on failed check of required issue label | yes | ## Required Issue Labels Missing In order to be considered for merging, the pull request's linked issues must each be labeled indicating they're accepting pull requests. |
| protected-branch | Protected Branch | yes | "" |
| protected-branch-auto-close | Whether or not to auto-close on failed check of PR head branch' | yes | true |
| protected-branch-comment | Comment to leave on PR on failed check of PR head branch. | yes | ## Protected Branch In order to be considered for merging, the pull request changes must not be implemented on the "%branch%" branch. This is described in our Contributing Guide. We are closing this pull request and we would suggest that you implement your changes as described in our Contributing Guide and open a new pull request. |
| title-check-enable | Whether or not to lint PR title per [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) | yes | true |
| title-comment | Comment to leave on PR on failed check of PR title per [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) | yes | ## Conventional Commit PR Title In order to be considered for merging, the pull request title must match the specification in [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). You can edit the title in order for this check to pass. Most often, our PR titles are something like one of these: - docs: correct typo in README - feat: implement dark mode" - fix: correct remove button behavior |
| watch-files | Files to flag modifications | yes | "" |
| watch-files-comment | Comment to leave on PR when watched files have been changed. | yes | ## Watched Files This pull request modifies specific files that require careful review by the maintainers. |
Outputs
| name | description |
|---|---|
| body-check | Result of match for PR Body against configured regex. |
| branch-check | Result of check to ensure PR head is not protected branch. |
| issue-label-check | Result of check to ensure linked issue has required labels. |
| title-check | Result of check to ensure PR title is formatted per [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) |
| watch-files-check | Result of check for watched files having been modified. True if no modifications found to watched files. |