Anonymous View
Skip to content

Handle missing COPILOT_GITHUB_TOKEN gracefully for scheduled Weekly Content Update runs#22

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/debug-workflow-failure
Draft

Handle missing COPILOT_GITHUB_TOKEN gracefully for scheduled Weekly Content Update runs#22
Copilot wants to merge 2 commits into
mainfrom
copilot/debug-workflow-failure

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The Weekly Content Update workflow failed when COPILOT_GITHUB_TOKEN was not configured, due to unconditional secret validation in the agent job. This change makes scheduled runs skip the agent path when the token is absent, while keeping manual dispatch behavior unchanged.

  • Root cause

    • agent job always executed and always validated COPILOT_GITHUB_TOKEN, causing hard failure on missing secret.
  • Workflow behavior change

    • Added a guard so the agent job only runs when:
      • event is not schedule, or
      • secrets.COPILOT_GITHUB_TOKEN is present.
    • Result:
      • scheduled runs: skip agent job if token is missing
      • manual workflow_dispatch: still surfaces missing token misconfiguration
  • Files updated

    • .github/workflows/weekly-content-update.md
    • .github/workflows/weekly-content-update.lock.yml
if: ${{ github.event_name != 'schedule' || secrets.COPILOT_GITHUB_TOKEN != '' }}

Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
Co-authored-by: htekdev <100806365+htekdev@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug weekly content update workflow failure Handle missing COPILOT_GITHUB_TOKEN gracefully for scheduled Weekly Content Update runs Jun 1, 2026
Copilot AI requested a review from htekdev June 1, 2026 14:28
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.

[agentics] Weekly Content Update failed

2 participants