Skip to content

Bump tracing-serde from 0.1.3 to 0.2.0 #383

Bump tracing-serde from 0.1.3 to 0.2.0

Bump tracing-serde from 0.1.3 to 0.2.0 #383

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 }}