Skip to content

Commit

Permalink
Merge pull request #908 from aanil/py312
Browse files Browse the repository at this point in the history
Replace PR label checker with local action
  • Loading branch information
aanil authored Jan 8, 2025
2 parents 7d140ad + 38b7e10 commit 02502ff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/pr_labels.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/check_pr_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check Label on PR
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]

jobs:
check-pr_label:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags

- name: Check if the PR contains the label validation or no validation
id: prlabel_check
if: |
! contains( github.event.pull_request.labels.*.name, 'validation') && ! contains( github.event.pull_request.labels.*.name, 'no validation')
run: |
echo "Neither 'validation' nor 'no validation' labels are present."
exit 1 # Exit with a failure

0 comments on commit 02502ff

Please sign in to comment.