mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-14 00:47:14 +00:00
chore(ci): improve checking the PR title (#464)
- Use [`action-semantic-pull-request`](https://github.com/amannn/action-semantic-pull-request) - Allow only reading the PR contents - Enable merge group
This commit is contained in:
parent
e098731d6c
commit
82b40be4ab
1 changed files with 13 additions and 11 deletions
22
.github/workflows/check-pr-title.yml
vendored
22
.github/workflows/check-pr-title.yml
vendored
|
@ -1,21 +1,23 @@
|
||||||
name: Check PR Title
|
name: Check Pull Requests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
- edited
|
- edited
|
||||||
|
- synchronize
|
||||||
|
merge_group:
|
||||||
|
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-title:
|
check-title:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check PR title
|
- name: Check PR title
|
||||||
run: |
|
if: github.event_name == 'pull_request_target'
|
||||||
title="${{ github.event.pull_request.title }}"
|
uses: amannn/action-semantic-pull-request@v5
|
||||||
if ! echo "$title" | grep -qE '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?: '; then
|
env:
|
||||||
echo "error: PR title does not follow the Conventional Commits guidelines"
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue