Bump tracing-serde from 0.1.3 to 0.2.0 #383
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Label Checker | |
on: | |
pull_request: | |
branches: main | |
types: [opened, labeled, unlabeled, synchronize, reopened] | |
permissions: | |
pull-requests: read | |
contents: read | |
jobs: | |
check-labels: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for specific labels | |
run: | | |
# Fetch repository labels from the GitHub API | |
REPO_LABELS=$(gh api repos/${{ github.repository }}/labels --jq '.[].name') | |
# Fetch labels applied to the current PR | |
PR_NUMBER=${{ github.event.pull_request.number }} | |
PR_LABELS=$(gh pr view $PR_NUMBER --json labels -q '.labels.[] | .name') | |
# Check if any PR label matches a repository label | |
for PR_LABEL in $PR_LABELS; do | |
if echo "$REPO_LABELS" | grep -qw "$PR_LABEL"; then | |
echo "Label '$PR_LABEL' matches a repository label." | |
exit 0 | |
fi | |
done | |
echo "None of the PR labels match repository labels." | |
exit 1 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |