-
Notifications
You must be signed in to change notification settings - Fork 14
35 lines (30 loc) · 1.24 KB
/
pull-request-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: PULL-REQUEST-CHECK
on:
pull_request_target:
types: [ edited, opened ]
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
jobs:
pr-check:
name: PR Pre-Check
if: ${{ !(startsWith(github.head_ref, 'releasing-') && startsWith(github.base_ref, 'release-')) }}
runs-on: ubuntu-latest
steps:
- name: check branch name
uses: apecloud-inc/[email protected]
if: github.event.pull_request.head.repo.full_name == github.repository
with:
branch_pattern: 'feature/|bugfix/|release/|hotfix/|support/|releasing/|dependabot/'
comment_for_invalid_branch_name: 'This branch name is not following the standards: feature/|bugfix/|release/|hotfix/|support/|releasing/|dependabot/'
fail_if_invalid_branch_name: 'true'
ignore_branch_pattern: 'main|master'
- name: check PR title
uses: amannn/action-semantic-pull-request@v5
- uses: actions/checkout@v4
- name: check issue link
run: |
bash ${{ github.workspace }}/.github/utils/issue_link.sh \
${{ github.repository }} \
${{ github.repository_owner }} \
${{ github.event.pull_request.number }} \
"${{ github.event.pull_request.title }}"