Validate Pull Request metadata and apply organizational guardrails to contributor pull requests.
- ✅ Conventional Commits: Enforces semantic pull request titles (e.g.
feat: ...,fix: ...) per conventionalcommits.org usingamannn/action-semantic-pull-request. - ✅ Educational UX: Provides explicit, custom GitHub annotations when title validation fails, instructing contributors exactly how to fix the issue without manually retrying CI.
- ✅ Fork Blocking: (Configurable) Rejects pull requests opened from forks with actionable guidance explaining that maintainers must review and re-host external contributions to execute privileged CI runners.
To run this action, the calling workflow job must have the following minimum permissions:
permissions:
pull-requests: read- name: Validate PR
uses: bcgov/actions/pr-validate@vX.Y.Z # Replace with latest release tag
# No inputs required!
# By default, it will check the PR title, reject forks, and use the native runner token.
- name: Validate PR (With Custom Inputs)
uses: bcgov/actions/pr-validate@vX.Y.Z
with:
# Optional: Enforce Conventional Commits format on the PR title
# Default: "true"
conventional_commits: "true"
# Optional: Reject PRs originating from forks
# Default: "true"
reject_forks: "true"