Skip to content

Commit ff0baa0

Browse files
authored
Redo issue assignment to copilot to match docs (#61123)
1 parent 77fcb53 commit ff0baa0

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/link-check-internal.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,20 @@ jobs:
154154
tableRows,
155155
].join('\n')
156156
157-
const issue = await github.rest.issues.create({
157+
// Use the REST API with agent_assignment to properly trigger Copilot cloud agent.
158+
// See: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/start-copilot-sessions#using-the-rest-api
159+
const issue = await github.request('POST /repos/{owner}/{repo}/issues', {
158160
owner: 'github',
159161
repo: 'docs-content',
160162
title: '[Copilot Task] Fix top redirect links: ${{ matrix.version }}/${{ matrix.language }}',
161163
body,
162164
labels: ['broken link report'],
163-
assignees: ['copilot'],
165+
assignees: ['copilot-swe-agent[bot]'],
166+
agent_assignment: {
167+
target_repo: 'github/docs-internal',
168+
base_branch: 'main',
169+
custom_instructions: 'For each entry in the table, open the source file in the github/docs-internal repository and replace the Current Link with the Update To path. When all changes are made, open a pull request in github/docs-internal with the fixes.',
170+
},
164171
})
165172
166173
core.info(`Created Copilot redirect issue: ${issue.data.html_url}`)

0 commit comments

Comments
 (0)