refactor: complete v1.0 simplification by removing all legacy inputs

- Remove all backward compatibility for v1.0 simplification
- Remove 10 legacy inputs from base-action/action.yml
- Remove 9 legacy inputs from main action.yml
- Simplify ClaudeOptions type to just timeoutMinutes and claudeArgs
- Remove all legacy option handling from prepareRunConfig
- Update tests to remove references to deleted fields
- Remove obsolete test file github/context.test.ts
- Clean up types to remove customInstructions, allowedTools, disallowedTools

Users now use claudeArgs exclusively for CLI control.
This commit is contained in:
km-anthropic
2025-08-08 00:32:57 -07:00
parent f2775d66df
commit f59258677e
23 changed files with 47 additions and 715 deletions

View File

@@ -270,33 +270,23 @@ describe("parseEnvVarsWithContext", () => {
});
});
describe("optional fields", () => {
test("should include custom instructions when provided", () => {
describe("context generation", () => {
test("should generate context without legacy fields", () => {
process.env = BASE_ENV;
const contextWithCustomInstructions = createMockContext({
const context = createMockContext({
...mockPullRequestCommentContext,
inputs: {
...mockPullRequestCommentContext.inputs,
customInstructions: "Be concise",
},
});
const result = prepareContext(contextWithCustomInstructions, "12345");
const result = prepareContext(context, "12345");
expect(result.customInstructions).toBe("Be concise");
});
test("should include allowed tools when provided", () => {
process.env = BASE_ENV;
const contextWithAllowedTools = createMockContext({
...mockPullRequestCommentContext,
inputs: {
...mockPullRequestCommentContext.inputs,
allowedTools: ["Tool1", "Tool2"],
},
});
const result = prepareContext(contextWithAllowedTools, "12345");
expect(result.allowedTools).toBe("Tool1,Tool2");
// Verify context is created without legacy fields
expect(result.repository).toBe("test-owner/test-repo");
expect(result.claudeCommentId).toBe("12345");
expect(result.triggerPhrase).toBe("/claude");
expect((result as any).customInstructions).toBeUndefined();
expect((result as any).allowedTools).toBeUndefined();
});
});
});