Skip to content

feat: making pr comment a common action #102

feat: making pr comment a common action

feat: making pr comment a common action #102

Workflow file for this run

name: PR Name Check
on:
pull_request:
branches:
- 'dev'
types: [opened, edited, synchronize]
jobs:
check-pr-name:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Check PR title
run: |
if ! echo "${{ github.event.pull_request.title }}" | grep -Eq "^(feat|fix|BREAKING CHANGE)(\([^)]+\))?: "; then
echo 'FAIL_OUTPUT=Invalid PR title. It must start with feat: or fix: or BREAKING CHANGE: or feat(<DESCRIPTOR>): or fix(<DESCRIPTOR>): or BREAKING CHANGE(<DESCRIPTOR>):' >> $GITHUB_ENV
exit 1
fi
- name: Comment on PR
if: failure()
uses: ./.github/actions/pr-comment
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_comment: ${{ env.FAIL_OUTPUT }}