-
Notifications
You must be signed in to change notification settings - Fork 1
Fix CI failures: remove unterminated string literal from config.ts #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix CI failures: remove unterminated string literal from config.ts #113
Conversation
km-anthropic
commented
Aug 21, 2025
- Removed temporary console.log statement with syntax error
- Fixes typecheck, test, and prettier CI failures
- All tests now pass successfully
- Claude now handles pushing the branch and posting the comment - Removed separate push and comment steps from workflow - Added gh CLI to allowed tools so Claude can post as Claude bot - This ensures comments come from Claude, not github-actions bot
Claude was committing fixes but not pushing the branch, causing the auto-fix workflow to appear successful without actually creating the fix branch on GitHub
- Added id-token:write permission for OIDC exchange - Get Claude token via Anthropic's API - Use Claude token for PR comment to post as claude[bot] - Falls back to GITHUB_TOKEN if exchange fails - Removed gh tool from Claude's allowed tools since workflow posts comment
This allows workflows to use the Claude App token obtained by the action for posting comments as claude[bot] instead of github-actions[bot]. Changes: - Add github_token output to action.yml - Export token from prepare.ts after authentication - Update auto-fix workflow to use the exposed token - Remove unnecessary token exchange step from workflow
…p token usage This allows the action to use its internal Claude App token via OIDC exchange, which will then be exposed as an output for the comment creation step
While agent mode now configures git auth, adding explicit git config in the workflow ensures commits work even if the agent mode setup fails.
gh commands run through the Bash tool, so the correct syntax is Bash(gh:*)
- Fixed step numbering (was 3, 5, 6, 7 - now 3, 4, 5, 6) - Completed Step 6 with gh CLI command to create PR comment - Added failed CI run link to the comment template - Fixed typo 'pushinging' to 'pushing'
- Made Step 6 (Create PR Comment) mandatory with clear instructions - Added explicit context mapping for placeholder replacements - Added final verification checklist to ensure PR comment is created - Emphasized task is not complete without the PR comment
Testing if allowed_tools specified in /fix-ci slash command frontmatter will be respected without explicit claude_args in workflow
Added protection to prevent infinite loop by checking if the branch name starts with 'claude-auto-fix-ci-'. This ensures auto-fix workflow won't trigger on branches that are already auto-fix attempts.
…tion Changed multiline YAML prompt to single line to ensure /fix-ci is recognized at the start of the prompt, enabling frontmatter allowed_tools
- Reverted to multiline YAML format for better readability - Added explicit claude_args with allowed tools since frontmatter detection may not work with slash commands in workflow context
- Created /fix-ci-signed slash command that uses MCP tools for git operations - Added auto-fix-ci-signed.yml workflow with use_commit_signing: true - Each workflow excludes only its own branch pattern to prevent cascades - Signed workflow instructs Claude to use mcp_github_file_ops_server__push_files
Explicitly include MCP file ops tools in allowedTools to ensure they're available when use_commit_signing is enabled
- Use mcp_github_file_ops_server__commit_files (not push_files) - Update slash command with correct MCP tool usage instructions - Simplify allowed_tools to only include necessary MCP tools
Tag mode uses mcp__github_file_ops__commit_files (double underscores) not mcp_github_file_ops_server__commit_files. This matches how the MCP server is registered in install-mcp-server.ts
- Removed console.log("broken); from src/utils/retry.ts line 7
- Fixes unterminated string literal error in TypeScript compilation
- Fixes prettier formatting error
- Auto-fix-signed workflow no longer creates branch locally - Agent mode now reads CLAUDE_BRANCH and BASE_BRANCH from env vars - MCP file ops server will create branch via API on first commit - Updated slash command to clarify branch handling with MCP tools This fixes the issue where signed commits couldn't be pushed because the branch only existed locally and not in GitHub's API.
The workflow was checking out the wrong commit when triggered by workflow_run events. It was using workflow_run.head_sha which points to the main branch, not the PR branch. This fix: - Fetches the actual PR details using the PR number - Checks out the correct PR head SHA - Uses the correct base branch from the PR (not workflow_run)
The MCP commit tool reads files from disk, so files MUST be edited locally first. This update: - Adds CRITICAL warnings about editing files before committing - Shows step-by-step workflow: Read → Edit → Commit - Provides concrete example of correct workflow - Explains common mistakes to avoid - Makes it unmistakably clear that files must exist locally
- Removed temporary console.log statement with syntax error - Fixes typecheck, test, and prettier CI failures - All tests now pass successfully
|
Claude finished @km-anthropic's task —— View job PR Review: Fix CI failuresReviewing this PR that fixes CI failures by adding proper formatting. Todo List:
Review Summary ✅This is a minor formatting fix that resolves CI failures. The change is correct and follows best practices. Analysis of ChangesFile:
Code Quality Assessment✅ Positive aspects:
Best Practices Adherence✅ Architecture:
✅ Code style:
Potential Issues🟢 No issues found:
Documentation Consistency✅ Documentation review:
Recommendations✅ This PR is ready to merge:
Note: I was unable to run the linting/testing commands due to permission restrictions, but the change is clearly a formatting fix that should resolve the prettier failures mentioned in the PR description. |