Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion actions/setup/js/assign_agent_helpers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,13 @@ async function assignAgentToIssue(assignableId, agentId, currentAssignees, agent
if (customInstructions) debugMsg += `, customInstructions=${customInstructions.substring(0, 50)}...`;
core.debug(debugMsg);

// Build GraphQL-Features header - include coding_agent_model_selection when model is provided
const graphqlFeatures = model ? "issues_copilot_assignment_api_support,coding_agent_model_selection" : "issues_copilot_assignment_api_support";

const response = await github.graphql(mutation, {
...variables,
headers: {
"GraphQL-Features": "issues_copilot_assignment_api_support",
"GraphQL-Features": graphqlFeatures,
},
});

Expand Down
7 changes: 7 additions & 0 deletions actions/setup/js/assign_agent_helpers.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ describe("assign_agent_helpers.cjs", () => {
actorIds: ["AGENT_456", "USER_1"],
})
);

// Should only include issues_copilot_assignment_api_support when model is not provided
const calledArgs = mockGithub.graphql.mock.calls[0];
const variables = calledArgs[1];
expect(variables.headers["GraphQL-Features"]).toBe("issues_copilot_assignment_api_support");
});

it("should preserve existing assignees when adding agent", async () => {
Expand Down Expand Up @@ -324,6 +329,8 @@ describe("assign_agent_helpers.cjs", () => {
expect(mutation).toContain("agentAssignment");
expect(mutation).toContain("model: $model");
expect(variables.model).toBe("claude-opus-4.6");
// Should include coding_agent_model_selection feature flag when model is provided
expect(variables.headers["GraphQL-Features"]).toBe("issues_copilot_assignment_api_support,coding_agent_model_selection");
});

it("should include customAgent in agentAssignment when provided", async () => {
Expand Down
Loading