Skip to content

[JMACS-12] Test PR

[JMACS-12] Test PR #6

Workflow file for this run

name: PR Validator
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
jobs:
pr-validator:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: thehanimo/[email protected]
id: check
continue-on-error: true
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-validator.json
- name: Add comment to fix PR title
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ steps.check.outputs.success == 'false'}}
with:
header: "PR Title Check"
recreate: true
message: |
### 🚨 PR Title Needs Formatting
The title of this PR needs to be formatted correctly and include an Azure Boards Reference.
Please update the title to match the format `type: description AB#xxx`. Examples:
* `bugfix: fix typo in README.md AB#123`
* `chore: update dependencies AB#456`
* `feat: add new feature AB#789`
* `chore: fixing build pipeline` - no AB reference
- name: Add comment that PR title is fixed
if: ${{ steps.check.outputs.success == 'true'}}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: "PR Title Check"
recreate: true
message: |
### ✅ PR Title Formatted Correctly
The title of this PR has been updated to match the correct format. Thank you!
- name: Fail the job
if: ${{ steps.check.outputs.success == 'false'}}
run: |
echo "PR title is not formatted correctly. Please update the title to match the format."
exit 1