feat: ticket-123 add github-branch-source plugin #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Title Checker | |
on: | |
push: | |
branches: | |
- main | |
pull_request_target: | |
types: | |
- opened | |
- edited | |
- synchronize | |
- labeled | |
- unlabeled | |
- assigned | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check PR title | |
uses: thehanimo/[email protected] | |
id: title_check | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pass_on_octokit_error: false | |
configuration_path: .github/pr-title-checker-config.json #(optional. defaults to .github/pr-title-checker-config.json) | |
- name: Comment PR | |
uses: actions/github-script@v6 | |
if: failure() # Only run if previous step failed. | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `### PR title needs formatting! | |
PR title should be like this: | |
PR title should be like this: '[feat|fix|chore|docs|ci][/|: ]ticket-XXX Brief summary' | |
For example: | |
fix/ticket-999 Reverting parameters from encryptSecret() | |
` | |
}) |