Skip to content

Commit 93199d8

Browse files
authored
Merge pull request #19 from aanil/master
Replace PR label checker
2 parents 0debb64 + 4e5ce89 commit 93199d8

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/pr_labels.yml

-6
This file was deleted.

.github/workflows/check_pr_label.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check Label on PR
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, labeled, unlabeled]
5+
6+
jobs:
7+
check-pr_label:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout PR
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0 # Fetch all history for all branches and tags
14+
15+
- name: Check if the PR contains the label validation or no validation
16+
id: prlabel_check
17+
if: |
18+
! contains( github.event.pull_request.labels.*.name, 'validation') && ! contains( github.event.pull_request.labels.*.name, 'no validation')
19+
run: |
20+
echo "Neither 'validation' nor 'no validation' labels are present."
21+
exit 1 # Exit with a failure

0 commit comments

Comments
 (0)