Commit Graph

258 Commits

Author SHA1 Message Date
km-anthropic
7ccb615087 Fix: Copy subagent files from repo to Claude runtime environment
This enables custom subagents to work in GitHub Actions by copying .claude/agents/*.md files from the repository to ~/.claude/agents/ during setup
2025-08-14 15:14:04 -07:00
km-anthropic
f317d3c55d Add deep-thinker subagent for testing subagent functionality 2025-08-14 15:14:04 -07:00
km-anthropic
50aee38198 Update review slash command to simple version that always posts comments 2025-08-12 15:00:33 -07:00
km-anthropic
39b3855841 Update workflow to use /review slash command 2025-08-12 14:29:54 -07:00
km-anthropic
d0f938f59a Merge fork changes 2025-08-12 14:28:57 -07:00
km-anthropic
d6a4b9c857 Add simple PR review slash command for GitHub Actions
- Reviews PR using embedded GitHub Actions variables
- Fetches PR details and diff using gh CLI
- Posts review as comment using gh pr comment
- Designed for use in automated workflows
2025-08-12 14:27:20 -07:00
km-anthropic
1dd746f3e2 Add slash command for comprehensive PR review
- Multi-agent review process with parallel analysis
- Confidence scoring for issues (80+ threshold)
- Strict formatting for GitHub comments
- Uses gh CLI for all GitHub interactions
2025-08-12 14:11:22 -07:00
km-anthropic
89eda5e432 Point workflow to origin's v1-dev branch 2025-08-12 13:22:46 -07:00
km-anthropic
dc5d6645af Use fork's v1-dev which has context prefixing 2025-08-12 12:56:53 -07:00
km-anthropic
ff46b61169 Add explicit MCP tool instructions to workflow 2025-08-12 12:52:31 -07:00
km-anthropic
e2e4286857 Simplify workflow - use origin v1-dev without explicit PR number 2025-08-12 12:49:10 -07:00
km-anthropic
6c58dba4ad Use fork's v1-dev with context prefixing 2025-08-12 12:40:58 -07:00
km-anthropic
74ee3b534f Explicitly specify PR number in prompt 2025-08-12 12:40:13 -07:00
km-anthropic
583874c9e0 Explicitly list MCP tools instead of using glob 2025-08-12 12:29:30 -07:00
km-anthropic
0932e8cf26 Fix quoting in claude_args for workflow 2025-08-12 12:26:35 -07:00
km-anthropic
c9bad6e9cb Allow MCP GitHub tools in auto-review workflow 2025-08-12 12:24:25 -07:00
km-anthropic
14e99e2a2b Add auto-review workflow for testing 2025-08-12 12:21:12 -07:00
km-anthropic
57cb0d9828 Match old workflow exactly - prevent approvals
- Use exact same permissions as old workflow
- Use fetch-depth: 1 like old workflow
- Remove timeout and extra features
- Only trigger on opened PRs
- Use claude_args with --allowedTools format
2025-08-11 14:54:48 -07:00
km-anthropic
44dd9dd8a8 Final test: Update README for complete review workflow test 2025-08-11 14:01:41 -07:00
km-anthropic
8052d271ce Enable PR review submission and remove old workflow
- Add back review submission tools to allow Claude to comment
- Keep using v1-dev with the fixed agent mode
- This replaces the old claude-review.yml functionality
2025-08-11 14:00:48 -07:00
km-anthropic
b61185b14c Test: Update README title for workflow testing 2025-08-11 13:55:00 -07:00
km-anthropic
808408602d Simplify review workflow - prevent multiple submissions
- Rename workflow to avoid conflicts
- Remove review submission tools
- Keep only essential tools for reading and analyzing PR
2025-08-11 13:53:02 -07:00
km-anthropic
c03f13d243 Fix agent mode to include GitHub MCP server with proper token 2025-08-11 13:46:35 -07:00
km-anthropic
d7a5b003e4 Update agent mode to have github server as a default 2025-08-11 13:22:11 -07:00
km-anthropic
0e90e18ac5 registry test update 2025-08-11 07:51:18 -07:00
km-anthropic
65d9b310c7 tests, typecheck, format 2025-08-11 07:51:09 -07:00
km-anthropic
c7801e975c bun format 2025-08-11 07:32:05 -07:00
km-anthropic
c93188b5fb Merge branch 'main' into v1-dev
Resolved conflicts:
- src/modes/agent/index.ts: Kept v1-dev approach (user controls via claude_args)
- src/modes/review/index.ts: Kept deleted (review mode removed in v1-dev)
2025-08-11 07:10:27 -07:00
km-anthropic
d5fbc80b71 Fix MCP tool availability and shell escaping in tag mode
Pass MCP config and allowed tools through claude_args to ensure tools like
mcp__github_comment__update_claude_comment are properly available to Claude CLI.

Key changes:
- Tag mode outputs claude_args with MCP config (as JSON string) and allowed tools
- Fixed shell escaping vulnerability when JSON contains single quotes
- Agent mode passes through user-provided claude_args unchanged
- Re-added mcp_config input for users to provide custom MCP servers
- Cleaned up misleading comments and unused file operations
- Clarified test workflow is for fork testing

Security fix: Properly escape single quotes in MCP config JSON to prevent
shell injection vulnerabilities.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 06:42:03 -07:00
Ashwin Bhat
4f4f43f044 docs: add prominent notice about upcoming v1.0 breaking changes (#437)
- Add GitHub alert box highlighting the v1.0 roadmap
- Link to discussion #428 for community feedback
- Briefly summarize key changes (automatic mode selection, unified prompt interface)
- Position prominently at top of README for maximum visibility
2025-08-10 16:19:08 -07:00
km-anthropic
5bdb1e4ae0 Fix MCP config not being passed to Claude CLI
The MCP servers (including github_comment server) were configured but not passed to Claude. This caused the "update_claude_comment" tool to be unavailable.

Changes:
- Write MCP config to a file at $RUNNER_TEMP/claude-mcp-config.json
- Add mcp_config_file output from prepare.ts
- Pass MCP config file via --mcp-config flag in claude_args
- Use fs/promises writeFile to match codebase conventions
2025-08-08 16:39:33 -07:00
Matthew Burke
8a5d751740 fix - allowed and disallowed tools ignored in agent mode (#424) 2025-08-08 14:34:55 -07:00
km-anthropic
1b4fc382c8 Simplify agent mode and re-add additional_permissions input
- Agent mode now only triggers when explicit prompt is provided
- Removed automatic triggering for workflow_dispatch/schedule without prompt
- Re-added additional_permissions input for requesting GitHub permissions
- Fixed TypeScript types for mock context helpers to properly handle partial inputs
- Updated documentation to reflect simplified mode behavior
2025-08-08 14:00:31 -07:00
km-anthropic
e2aee89b4a remove deprecated workflow file (tests features we no longer support) 2025-08-08 11:37:56 -07:00
km-anthropic
450e1a8259 Update package json 2025-08-08 11:24:23 -07:00
km-anthropic
3d480aa9c6 Merge branch 'main' of https://github.com/anthropics/claude-code-action into v1-dev 2025-08-08 11:19:04 -07:00
GitHub Actions
bc423b47f5 chore: bump Claude Code version to 1.0.72 2025-08-08 18:16:40 +00:00
km-anthropic
90461a9b4d Merge branch 'main' of https://github.com/anthropics/claude-code-action into v1-dev 2025-08-08 09:38:33 -07:00
Steve
6d5c92076b non negative line validation for comment server (#429)
* enforce non-negative validation for line in GH comment server

* include  .nonnegative() for startLine too
v0.0.55
2025-08-08 08:36:20 -07:00
km-anthropic
ed42f1a4c4 model version update 2025-08-08 01:23:49 -07:00
km-anthropic
f407f21830 fix: update MCP server tests after removing additionalPermissions
- Change github_ci server logic to check for workflow token presence
- Update test names to reflect new behavior
- Fix test that was incorrectly setting workflow token
2025-08-08 01:10:43 -07:00
km-anthropic
f59258677e 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.
2025-08-08 00:53:54 -07:00
Yuku Kotani
fec554fc7c feat: add flexible bot access control with allowed_bots option (#117)
* feat: skip permission check for GitHub App bot users

GitHub Apps (users ending with [bot]) now bypass permission checks
as they have their own authorization mechanism.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add allow_bot_users option to control bot user access

- Add allow_bot_users input parameter (default: false)
- Modify checkHumanActor to optionally allow bot users
- Add comprehensive tests for bot user handling
- Improve security by blocking bot users by default

This change prevents potential prompt injection attacks from bot users
while providing flexibility for trusted bot integrations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: mark bot user support feature as completed in roadmap

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: move allowedBots parameter to context object

Move allowedBots from function parameter to context.inputs to maintain
consistency with other input handling throughout the codebase.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: update README for bot user support feature

Add documentation for the new allowed_bots parameter that enables
bot users to trigger Claude actions with granular control.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: add missing allowedBots property in permissions test

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update bot name format to include [bot] suffix in tests and docs

- Update test cases to use correct bot actor names with [bot] suffix
- Update documentation example to show correct bot name format
- Align with GitHub's actual bot naming convention

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: normalize bot names for allowed_bots validation

- Strip [bot] suffix from both actor names and allowed bot list for comparison
- Allow both "dependabot" and "dependabot[bot]" formats in allowed_bots input
- Display normalized bot names in error messages for consistency
- Add comprehensive test coverage for both naming formats

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-07 18:03:20 -07:00
GitHub Actions
59ca6e42d9 chore: bump Claude Code version to 1.0.71 2025-08-07 22:57:57 +00:00
km-anthropic
f2775d66df format 2025-08-07 15:48:07 -07:00
km-anthropic
a7759cfcd1 feat: add claudeArgs input for direct CLI argument passing
- Add claude_args input to action.yml for flexible CLI control
- Parse arguments with industry-standard shell-quote library
- Maintain proper argument order: -p [claudeArgs] [legacy] [BASE_ARGS]
- Keep tag mode defaults (needed for functionality)
- Agent mode has no defaults (full user control)
- Add comprehensive tests for new functionality
- Add example workflow showing usage
2025-08-07 15:45:17 -07:00
km-anthropic
e2bdca6133 bun format 2025-08-07 15:18:44 -07:00
km-anthropic
b6238ad00e refactor: use industry-standard shell-quote for argument parsing
- Replace custom parseShellArgs with battle-tested shell-quote package
- Simplify code by removing unnecessary -p filtering (Claude handles it)
- Update tests to use shell-quote directly
- Add example workflow showing claude_args usage

This provides more robust argument parsing while reducing code complexity.
2025-08-07 15:18:00 -07:00
km-anthropic
dfcaac854e feat: add claudeArgs input for direct CLI argument passing
- Add claude_args input to both action.yml files
- Implement shell-style argument parsing with quote handling
- Pass arguments directly to Claude CLI for maximum flexibility
- Add comprehensive tests for argument parsing
- Log custom arguments for debugging

Users can now pass any Claude CLI arguments directly:
  claude_args: '--max-turns 3 --mcp-config /path/to/config.json'

This provides power users full control over Claude's behavior without
waiting for specific inputs to be added to the action.
2025-08-07 14:01:27 -07:00
km-anthropic
36c720c2db prettify 2025-08-07 12:30:03 -07:00