export async function ghAddAssigneesToAssignable(
assignableId: string,
assigneeIds: string[],
token: string,
) {
const { Octokit } = await import("npm:@octokit/core");
const octokit = new Octokit({ auth: token });
const graphqlVariables = {
assignableId,
assigneeIds,
};
const mutation = `
mutation($assigneeIds:[ID!]!, $assignableId:ID!){
addAssigneesToAssignable(input: {assigneeIds: $assigneeIds, assignableId: $assignableId}) {
assignable {
... on Issue {
id,
number,
title
}
}
}
}
`;
return octokit.graphql(mutation, graphqlVariables);
}