@@ -2,7 +2,7 @@ import type { Octokit } from '@octokit/core';
22import { Issue } from './Issue.js' ;
33
44// https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/assign-copilot-to-an-issue#assigning-an-existing-issue
5- export async function fixIssue ( octokit : Octokit , { owner, repository, issueNumber, nodeId } : Issue ) {
5+ export async function assignIssue ( octokit : Octokit , { owner, repository, issueNumber, nodeId } : Issue ) {
66 // Check whether issues can be assigned to Copilot
77 const suggestedActorsResponse = await octokit . graphql < {
88 repository : {
@@ -54,7 +54,7 @@ export async function fixIssue(octokit: Octokit, { owner, repository, issueNumbe
5454 return ;
5555 }
5656 // Assign issue to Copilot
57- const response = await octokit . graphql < {
57+ await octokit . graphql < {
5858 replaceActorsForAssignable : {
5959 assignable : {
6060 id : string ;
@@ -84,9 +84,4 @@ export async function fixIssue(octokit: Octokit, { owner, repository, issueNumbe
8484 }` ,
8585 { issueId, assigneeId : suggestedActorsResponse ?. repository ?. suggestedActors ?. nodes [ 0 ] ?. id }
8686 ) ;
87- return {
88- nodeId : response . replaceActorsForAssignable . assignable . id ,
89- url : response . replaceActorsForAssignable . assignable . url ,
90- title : response . replaceActorsForAssignable . assignable . title ,
91- }
9287}
0 commit comments