Repository navigation
feat(examples): add solidify-even-thickness and boolean-exact-volume #286
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: Label PRs | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| label: | |
| name: Auto-label by path | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Get changed files | |
| id: changed | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # The files endpoint lists paths only. `gh pr diff --name-only` fetches the | |
| # whole diff first and fails with HTTP 406 past 20,000 lines, which a | |
| # full docs/gallery regeneration exceeds (#300). | |
| run: | | |
| FILES=$(gh api --paginate "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --jq '.[].filename') | |
| echo "files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| - name: Apply labels | |
| env: | |
| FILES: ${{ steps.changed.outputs.files }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| LABELS="" | |
| if echo "$FILES" | grep -q "^skills/"; then | |
| LABELS="$LABELS skills" | |
| fi | |
| if echo "$FILES" | grep -q "^rules/"; then | |
| LABELS="$LABELS rules" | |
| fi | |
| if echo "$FILES" | grep -q "^snippets/"; then | |
| LABELS="$LABELS snippets" | |
| fi | |
| if echo "$FILES" | grep -q "^templates/"; then | |
| LABELS="$LABELS templates" | |
| fi | |
| if echo "$FILES" | grep -q "^examples/"; then | |
| LABELS="$LABELS examples" | |
| fi | |
| if echo "$FILES" | grep -q "^showcase/"; then | |
| LABELS="$LABELS showcase" | |
| fi | |
| if echo "$FILES" | grep -qE "(README\.md|AGENTS\.md|CLAUDE\.md|ROADMAP\.md|CHANGELOG\.md|^docs/)"; then | |
| LABELS="$LABELS documentation" | |
| fi | |
| if echo "$FILES" | grep -q "^\.github/"; then | |
| LABELS="$LABELS ci" | |
| fi | |
| if [ -n "$LABELS" ]; then | |
| for label in $LABELS; do | |
| gh label create "$label" --force --color "ededed" 2>/dev/null || true | |
| gh pr edit ${{ github.event.pull_request.number }} --add-label "$label" | |
| done | |
| echo "Applied labels:$LABELS" | |
| else | |
| echo "No labels to apply" | |
| fi |