From e3f9d069d2cac9b577e39f0700612d98d6d57b17 Mon Sep 17 00:00:00 2001 From: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Date: Sun, 26 Jul 2026 19:49:08 +0200 Subject: [PATCH 1/2] fix(customer-priority-bump): apply the 'priority' label, not the field (D5) (#84) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit D5 replaced the Priority single-select field with a binary 'priority' label. This reusable still set the (now-removed) Priority field, so it would fail once the field is deleted. Rewrite it to 'gh issue edit --add-label priority' — the label is visible on the issue and filterable everywhere. Prerequisite for deleting the Priority project field: this must be on main first, or the workflow errors on the missing field. --- .github/workflows/customer-priority-bump.yml | 72 ++------------------ 1 file changed, 7 insertions(+), 65 deletions(-) diff --git a/.github/workflows/customer-priority-bump.yml b/.github/workflows/customer-priority-bump.yml index 4106736..4d5fbcc 100644 --- a/.github/workflows/customer-priority-bump.yml +++ b/.github/workflows/customer-priority-bump.yml @@ -1,7 +1,7 @@ name: Bump priority on customer-flagged issue # Reusable workflow. Called from each active repo on any issue label change. -# When the 'from:customer' label is applied, sets Priority=P1 on the kanban. +# When the 'from:customer' label is applied, adds the 'priority' label (D5). on: workflow_call: @@ -24,73 +24,15 @@ jobs: if: github.event.label.name == inputs.trigger-label runs-on: ubuntu-latest steps: - - name: Set Priority for the customer issue + - name: Label the customer issue as priority env: GH_TOKEN: ${{ secrets.PROJECTS_KANBAN_TOKEN }} - ORG: ${{ inputs.org }} - PROJECT_NUMBER: ${{ inputs.project-number }} - PRIORITY_NAME: ${{ inputs.target-priority }} ISSUE_NUMBER: ${{ github.event.issue.number }} REPO_FULL: ${{ github.repository }} run: | set -euo pipefail - REPO_NAME="${REPO_FULL#*/}" - - # shellcheck disable=SC2016 # the $names here are GraphQL variables, not shell - keep literal - PROJ=$(gh api graphql -f query=' - query($org: String!, $num: Int!) { - organization(login: $org) { - projectV2(number: $num) { - id - fields(first: 50) { - nodes { - ... on ProjectV2SingleSelectField { id name options { id name } } - } - } - } - } - }' -F org="$ORG" -F num="$PROJECT_NUMBER") - - PROJECT_ID=$(echo "$PROJ" | jq -r '.data.organization.projectV2.id') - PRIORITY_FIELD=$(echo "$PROJ" | jq -r '.data.organization.projectV2.fields.nodes[] - | select(.name=="Priority") | .id') - PRIORITY_OPT=$(echo "$PROJ" | jq -r --arg p "$PRIORITY_NAME" '.data.organization.projectV2.fields.nodes[] - | select(.name=="Priority") | .options[] | select(.name==$p) | .id') - - # Wait briefly for auto-add to register the issue on the project - for i in 1 2 3 4 5; do - # shellcheck disable=SC2016 # the $names here are GraphQL variables, not shell - keep literal - ITEM_ID=$(gh api graphql -f query=' - query($org: String!, $repo: String!, $num: Int!) { - repository(owner: $org, name: $repo) { - issue(number: $num) { - projectItems(first: 10) { nodes { id project { number } } } - } - } - }' -F org="$ORG" -F repo="$REPO_NAME" -F num="$ISSUE_NUMBER" \ - | jq -r --arg n "$PROJECT_NUMBER" '.data.repository.issue.projectItems.nodes[]? - | select(.project.number == ($n | tonumber)) | .id' | head -1) - if [ -n "$ITEM_ID" ] && [ "$ITEM_ID" != "null" ]; then break; fi - echo "Issue not yet on project, retrying ($i/5)…" - sleep 5 - done - - if [ -z "$ITEM_ID" ] || [ "$ITEM_ID" = "null" ]; then - echo "Issue #$ISSUE_NUMBER not on project after 5 retries — skipping." - exit 0 - fi - - # Pass the option ID with -f (raw string), NOT -F: ProjectV2 option IDs can - # be all-numeric, and -F coerces all-digit values to an integer, which the - # $o: String! variable rejects. -f forces a string. (The option set here can - # be all-numeric, so this matters even if today's happens to have letters.) - # shellcheck disable=SC2016 # the $names here are GraphQL variables, not shell - keep literal - gh api graphql -f query=' - mutation($p: ID!, $i: ID!, $f: ID!, $o: String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $p, itemId: $i, fieldId: $f, - value: {singleSelectOptionId: $o} - }) { projectV2Item { id } } - }' -F p="$PROJECT_ID" -F i="$ITEM_ID" -F f="$PRIORITY_FIELD" -f o="$PRIORITY_OPT" > /dev/null - - echo "→ Issue #$ISSUE_NUMBER bumped to Priority=$PRIORITY_NAME" + # D5: priority is a binary "priority" label, not a project field. The + # label is visible on the issue itself and filterable everywhere; the + # Priority single-select field has been removed from the board. + gh issue edit "$ISSUE_NUMBER" --repo "$REPO_FULL" --add-label priority + echo "-> Issue #$ISSUE_NUMBER labelled 'priority'" From 985011535a50e24eb496e5372d9bd6de53062a8b Mon Sep 17 00:00:00 2001 From: lukasWuttke <54042461+LukasWodka@users.noreply.github.com> Date: Sun, 26 Jul 2026 20:23:13 +0200 Subject: [PATCH 2/2] =?UTF-8?q?chore(.github):=20drop=20self=20fr-gate=20c?= =?UTF-8?q?aller=20=E2=80=94=20.github=20is=20docs-treated,=20no=20env=20l?= =?UTF-8?q?adder=20to=20FR=20on=20(RFC-0008)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fr-gate-caller.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/fr-gate-caller.yml diff --git a/.github/workflows/fr-gate-caller.yml b/.github/workflows/fr-gate-caller.yml deleted file mode 100644 index 65a55e6..0000000 --- a/.github/workflows/fr-gate-caller.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: FR gate - -# Per-repo caller. Copy into each active repo's .github/workflows/. -# Should also be configured as a required status check on the -# staging and main/master branches via branch protection. - -on: - pull_request: - branches: [staging, main, master] - types: [opened, reopened, synchronize, ready_for_review, labeled, unlabeled] - -jobs: - gate: - uses: tracebloc/.github/.github/workflows/fr-gate.yml@main - secrets: inherit