From 42fce56d3fac0023bb326a39c796568feb54c095 Mon Sep 17 00:00:00 2001 From: km-anthropic Date: Tue, 19 Aug 2025 15:14:50 -0700 Subject: [PATCH] Enable use_commit_signing to provide MCP file ops server for CI fixes - Add use_commit_signing: true to auto-fix workflows - Update slash commands to use mcp__github_file_ops__commit_files - This enables Claude to write and commit files through MCP --- .claude/commands/fix-ci-commit.md | 12 +++++------- .claude/commands/fix-ci.md | 10 +++++----- .github/workflows/auto-fix-ci-inline.yml | 1 + .github/workflows/auto-fix-ci.yml | 1 + slash-commands/fix-ci-commit.md | 12 +++++------- slash-commands/fix-ci.md | 8 ++++---- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.claude/commands/fix-ci-commit.md b/.claude/commands/fix-ci-commit.md index 82b8064..cc156a3 100644 --- a/.claude/commands/fix-ci-commit.md +++ b/.claude/commands/fix-ci-commit.md @@ -31,20 +31,18 @@ Based on the error logs: After fixing ALL issues, you MUST: -```bash -# Stage all changes -git add -A +Use the `mcp__github_file_ops__commit_files` tool to commit all your changes with a descriptive message like: -# Commit with descriptive message -git commit -m "Fix CI failures +``` +Fix CI failures - Fixed syntax errors - Fixed formatting issues - Fixed test failures -[List actual fixes made]" +[List actual fixes made] ``` -**IMPORTANT**: You MUST use the Bash tool to run the git add and git commit commands above. The workflow expects you to commit your changes. +**IMPORTANT**: You MUST use the MCP file ops tool to commit your changes. The workflow expects you to commit your changes. ### 3. Verify (Optional) diff --git a/.claude/commands/fix-ci.md b/.claude/commands/fix-ci.md index 97b0d0d..0547690 100644 --- a/.claude/commands/fix-ci.md +++ b/.claude/commands/fix-ci.md @@ -42,11 +42,11 @@ Requirements: ## Step 4: Commit Changes -After applying ALL fixes, use the Bash tool to: -1. Run: `git add -A` to stage all modified files -2. Run: `git commit -m "Fix CI failures: "` to commit the changes -3. Include details about which CI jobs/tests were fixed in the commit message -4. Important: You MUST use the Bash tool to run these git commands to commit your changes +After applying ALL fixes: +1. Use the `mcp__github_file_ops__commit_files` tool to commit your changes +2. Include a descriptive commit message explaining what was fixed +3. Document which CI jobs/tests were addressed in the commit message +4. Important: Use the MCP file ops tool, not git commands directly ## Step 5: Verify Fixes Locally diff --git a/.github/workflows/auto-fix-ci-inline.yml b/.github/workflows/auto-fix-ci-inline.yml index 9f4465b..25dd5cc 100644 --- a/.github/workflows/auto-fix-ci-inline.yml +++ b/.github/workflows/auto-fix-ci-inline.yml @@ -147,6 +147,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} timeout_minutes: "30" use_sticky_comment: "true" + use_commit_signing: "true" claude_args: "--max-turns 15" - name: Push fix branch diff --git a/.github/workflows/auto-fix-ci.yml b/.github/workflows/auto-fix-ci.yml index 4bc3236..71ee575 100644 --- a/.github/workflows/auto-fix-ci.yml +++ b/.github/workflows/auto-fix-ci.yml @@ -89,6 +89,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} timeout_minutes: "30" use_sticky_comment: "true" + use_commit_signing: "true" claude_args: "--max-turns 15" - name: Push fix branch diff --git a/slash-commands/fix-ci-commit.md b/slash-commands/fix-ci-commit.md index 82b8064..cc156a3 100644 --- a/slash-commands/fix-ci-commit.md +++ b/slash-commands/fix-ci-commit.md @@ -31,20 +31,18 @@ Based on the error logs: After fixing ALL issues, you MUST: -```bash -# Stage all changes -git add -A +Use the `mcp__github_file_ops__commit_files` tool to commit all your changes with a descriptive message like: -# Commit with descriptive message -git commit -m "Fix CI failures +``` +Fix CI failures - Fixed syntax errors - Fixed formatting issues - Fixed test failures -[List actual fixes made]" +[List actual fixes made] ``` -**IMPORTANT**: You MUST use the Bash tool to run the git add and git commit commands above. The workflow expects you to commit your changes. +**IMPORTANT**: You MUST use the MCP file ops tool to commit your changes. The workflow expects you to commit your changes. ### 3. Verify (Optional) diff --git a/slash-commands/fix-ci.md b/slash-commands/fix-ci.md index 2fbaa8b..1f4834b 100644 --- a/slash-commands/fix-ci.md +++ b/slash-commands/fix-ci.md @@ -43,10 +43,10 @@ Requirements: ## Step 4: Commit Changes After applying fixes: -1. Stage all modified files with `git add -A` or `git add .` -2. Commit with a descriptive message using `git commit -m "Fix CI failures: "` -3. Include details about which CI jobs/tests were fixed in the commit message -4. Important: Always commit your changes even if you're already on a branch +1. Use the `mcp__github_file_ops__commit_files` tool to commit your changes +2. Include a descriptive commit message explaining what was fixed +3. Document which CI jobs/tests were addressed in the commit message +4. Important: Use the MCP file ops tool to commit your changes ## Step 5: Verify Fixes Locally