Skip to content

Guard support-label workflows when SUPPORT_LABELS_TOKEN is unavailable - #45

Draft
yi-nuo426 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-audit-github-actions-job
Draft

Guard support-label workflows when SUPPORT_LABELS_TOKEN is unavailable#45
yi-nuo426 with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-audit-github-actions-job

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown

The audit Actions job was failing before it could perform any checks because SUPPORT_LABELS_TOKEN was unset, leaving GH_TOKEN empty. This change makes the support-label workflows degrade cleanly when the token is not configured.

  • Workflow gating

    • Promote SUPPORT_LABELS_TOKEN to a job-level env in both support-label workflows.
    • Skip token-dependent steps unless the secret is present.
  • Graceful no-op behavior

    • Add an explicit notice step so skipped runs are visible in Actions output instead of failing inside the shell script.
    • Preserve existing behavior unchanged when the token is configured.
  • Scope

    • Apply the same guard to both:
      • audit-support-labels.yml
      • apply-support-labels.yml
env:
  SUPPORT_LABELS_TOKEN: ${{ secrets.SUPPORT_LABELS_TOKEN }}

- name: Skip audit when support-labels token is unavailable
  if: ${{ env.SUPPORT_LABELS_TOKEN == '' }}
  run: echo "::notice::SUPPORT_LABELS_TOKEN is not configured; skipping support-label audit."

- name: Audit support labels
  if: ${{ env.SUPPORT_LABELS_TOKEN != '' }}
  env:
    GH_TOKEN: ${{ env.SUPPORT_LABELS_TOKEN }}

Co-authored-by: yi-nuo426 <218099172+yi-nuo426@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job audit Guard support-label workflows when SUPPORT_LABELS_TOKEN is unavailable Aug 7, 2026
Copilot AI requested a review from yi-nuo426 August 7, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants