Skip to content

Comments

Auto-assign @copilot to workflow sync issues when agent token available#11054

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/update-workflows-sync-check
Closed

Auto-assign @copilot to workflow sync issues when agent token available#11054
Copilot wants to merge 2 commits intomainfrom
copilot/update-workflows-sync-check

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

The agentic maintenance workflow creates issues when workflows are out of sync but doesn't assign them to anyone. This adds automatic @copilot assignment when GH_AW_AGENT_TOKEN secret is configured.

Changes

  • Maintenance workflow generator (pkg/workflow/maintenance_workflow.go): Pass GH_AW_AGENT_TOKEN as env var and github-token parameter with fallback to GITHUB_TOKEN

  • Workflow sync checker (actions/setup/js/check_workflow_recompile_needed.cjs): After issue creation, check for token availability and assign copilot using existing assign_agent_helpers.cjs functions

  • Graceful degradation: When token unavailable, issue creation proceeds normally without assignment

Example

- name: Check for out-of-sync workflows and create issue if needed
  uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
  env:
    GH_AW_AGENT_TOKEN: ${{ secrets.GH_AW_AGENT_TOKEN }}
  with:
    github-token: ${{ secrets.GH_AW_AGENT_TOKEN || secrets.GITHUB_TOKEN }}
    script: |
      const { main } = require('/opt/gh-aw/actions/check_workflow_recompile_needed.cjs');
      await main();

Assignment failures log warnings without breaking the workflow.

Original prompt

If you update the code that checks whether workflows are in sync in the agentic maintenance workflow, and the workflows are not in sync, and the gh-aw-agent-token secret is available, then the workflow should automatically create an issue and assign it to @copilot.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Update maintenance_workflow.go to pass GH_AW_AGENT_TOKEN secret
- Add logic to check_workflow_recompile_needed.cjs to assign copilot when token is available
- Regenerate agentics-maintenance.yml with the new configuration
- Use existing assign_agent_helpers.cjs for assignment logic

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update agentic maintenance workflow for issue creation Auto-assign @copilot to workflow sync issues when agent token available Jan 21, 2026
Copilot AI requested a review from pelikhan January 21, 2026 16:42
@pelikhan pelikhan closed this Jan 21, 2026
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