Update reference to sofar example #21
Workflow file for this run
This file contains hidden or 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: pull_request label | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - labeled | |
| - unlabeled | |
| - synchronize | |
| jobs: | |
| check-labels: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: pull_request label | |
| run: | | |
| echo "Checking for label on pull request..." | |
| PR_DATA=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}) | |
| LABEL_NAMES=$(echo "$PR_DATA" | jq -r '.labels[].name') | |
| echo "Labels: $LABEL_NAMES" | |
| if [ -z "$LABEL_NAMES" ]; then | |
| echo "Error: No label found on this pull request. Please add a label." | |
| exit 1 | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |