diff --git a/.github/workflows/PRLabeler.yml b/.github/workflows/PRLabeler.yml index 1e31d98e..840f90ce 100644 --- a/.github/workflows/PRLabeler.yml +++ b/.github/workflows/PRLabeler.yml @@ -1,54 +1,15 @@ -name: Checkbox Labeler - +# Thin caller. The implementation lives ONCE, in QAtlasHub/.github (public, callable from any +# owner), so the next breakage is one commit there instead of one PR per repo — this file used +# to be a hand-rolled `gh pr edit` script, which GitHub's Projects-classic sunset broke in +# every repo at once on 2026-07-28. +name: PR Labeler on: pull_request: - types: [opened, edited] - + types: [opened, edited, synchronize, reopened] permissions: + contents: read pull-requests: write - issues: write # required for gh label create - + issues: write # addLabels / createLabel are issue-scoped, even on a PR jobs: - labeler: - runs-on: ubuntu-latest - steps: - - name: Update Labels based on Checkboxes - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_BODY: ${{ github.event.pull_request.body }} - PR_NUMBER: ${{ github.event.pull_request.number }} - REPO: ${{ github.repository }} - run: | - # Ensure all labels exist (--force updates color/description if already present) - gh label create "enhancement" --repo "$REPO" --color "a2eeef" --force - gh label create "bug" --repo "$REPO" --color "d73a4a" --force - gh label create "performance" --repo "$REPO" --color "e4e669" --force - gh label create "documentation" --repo "$REPO" --color "0075ca" --force - gh label create "chore" --repo "$REPO" --color "e8e8e8" --force - gh label create "breaking" --repo "$REPO" --color "b60205" --force - - if echo "$PR_BODY" | grep -qi "\- \[x\].*Feature"; then - gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "enhancement" - fi - - if echo "$PR_BODY" | grep -qi "\- \[x\].*Bug Fix"; then - gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "bug" - fi - - if echo "$PR_BODY" | grep -qi "\- \[x\].*Performance"; then - gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "performance" - fi - - if echo "$PR_BODY" | grep -qi "\- \[x\].*Documentation"; then - gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "documentation" - fi - - if echo "$PR_BODY" | grep -qi "\- \[x\].*Maintenance"; then - gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "chore" - fi - - if echo "$PR_BODY" | grep -qi "\- \[x\].*Breaking"; then - gh pr edit "$PR_NUMBER" --repo "$REPO" --add-label "breaking" - else - gh pr edit "$PR_NUMBER" --repo "$REPO" --remove-label "breaking" 2>/dev/null || true - fi + label: + uses: QAtlasHub/.github/.github/workflows/labeler.yml@v1 diff --git a/Project.toml b/Project.toml index b214d187..729a7092 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Pinax" uuid = "e782a80a-1ac9-479e-ba2b-0f3433ef5b4f" -version = "0.39.15" +version = "0.39.16" authors = ["sota shimozono "] [deps] @@ -49,4 +49,4 @@ ParamIO = "938a3ac2-d340-473c-bcf1-88af577e4ccf" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Aqua", "Downloads", "DataVault", "Documenter", "ParamIO"] \ No newline at end of file +test = ["Test", "Aqua", "Downloads", "DataVault", "Documenter", "ParamIO"]