[AUTOMATION] Submit Repositories Workflow Update - #35
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the “Submit Repositories” automation by switching migration issue creation + Copilot cloud agent assignment to the newer single-call REST API (agent_assignment) and refactoring the script to reuse a dedicated issue-submit GitHub client across repositories. It also updates the workflow’s GitHub App token step configuration.
Changes:
- Replaced the prior multi-step GraphQL assignment flow with a single
POST /repos/{owner}/{repo}/issuescall that both creates the issue and assigns the Copilot cloud agent viaagent_assignment. - Added
deriveCustomAgentName()to select a migration-type-specific custom agent based on the prompt filename, and reused one issue-submit client for all repos in a run. - Updated the workflow token step input from
app-idtoclient-id(but this needs correction to match the repo variable semantics).
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/submit-repos.yml | Updates GitHub App token step input; currently mismatched with the repo’s GH_APP_ID variable meaning. |
| .github/scripts/submit-repositories.js | Refactors issue creation/assignment into one REST call with agent_assignment, adds custom agent derivation, and reuses a single issue client. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Collaborator
Author
|
Working with @stoe to get this fixed for a demo, using a bypass for speed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the migration issue creation and assignment workflow in
.github/scripts/submit-repositories.jsto streamline the process of creating migration issues and assigning them to the Copilot cloud agent. It also fixes a configuration issue in the workflow YAML. The most important changes include combining issue creation and Copilot agent assignment into a single API call, introducing a utility for deriving custom agent names, and improving the efficiency of GitHub client usage.Migration issue creation and Copilot assignment:
agent_assignmentinput, replacing the previous multi-step GraphQL approach. This simplifies the workflow and leverages the latest GitHub API capabilities. [1] [2]deriveCustomAgentNameutility function to extract the custom agent name from the prompt file name, ensuring the correct agent is used for each migration.Codebase and performance improvements:
Workflow configuration fix:
.github/workflows/submit-repos.ymlby replacingapp-idwithclient-idfor theactions/create-github-app-tokenstep, ensuring proper authentication setup.Note: This closes #34