Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Aug 11, 2024
1 parent c0a008b commit 4456074
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/convention.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
name: PR Naming Convention Check
name: PR Title Validation

on:
pull_request:
types: [opened, edited, reopened, synchronize]
# pull_request_target is ok until we do not checkout and build external code
# TODO: maybe it is not required after all https://github.com/amannn/action-semantic-pull-request/issues/219
pull_request_target:
types: [opened, reopened, synchronize, edited]

permissions:
pull-requests: read

jobs:
check-name:
title-check:
name: Check PR Title
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, '🙋 Bounty claim')

steps:
- name: Check PR Title
id: check_title
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ ! "$PR_TITLE" =~ ^\[ISSUE_[0-9]+\]\ .+ ]]; then
echo "PR title does not follow the naming convention [ISSUE_NUMBER] <description>"
exit 1
fi
- name: PR Title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Bounty PR Title
if: contains(github.event.pull_request.labels.*.name, '🙋 Bounty claim')
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
scopes: \d+

0 comments on commit 4456074

Please sign in to comment.