Skip to content

Commit 368b33f

Browse files
committed
ci(actions): require referenced issue and PR labels
1 parent dee7ebc commit 368b33f

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/linked-issue.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Verify Linked Issue
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- edited
9+
- synchronize
10+
11+
jobs:
12+
verify-linked-issue:
13+
runs-on: ubuntu-latest
14+
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
15+
name: Verify Pull Request references Issue
16+
steps:
17+
- uses: Codeinwp/verify-linked-issue-action@6da9af91d78847c7ea264083a64eab3271b4369f
18+
id: verify_issue_reference
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Report no referenced issue
22+
if: steps.verify_issue_reference.outputs.has_linked_issues != 'true'
23+
run: exit 1;

.github/workflows/pr-labeled.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Require semantic labels
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- labeled
8+
- unlabeled
9+
- synchronize
10+
11+
jobs:
12+
check-pr-label-and-comment:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: yashhy/[email protected]
16+
with:
17+
# This list is duplicated from release-drafter.yml
18+
required_labels: 'chore,ci,cleanup,perf,refactor,style,test'
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)