Commit Graph

51 Commits

Author SHA1 Message Date
Mark Wylde
fb6df649ed v1.0.1 2025-05-31 01:23:37 +01:00
Ashwin Bhat
180a1b6680 switch to opus for this repo's claude workflow (#97)
* switch to opus for this repo's claude workflow

* prettier
2025-05-30 08:14:11 -07:00
Ashwin Bhat
8da47815ec docs: add comprehensive FAQ covering common gotchas and limitations (#92)
- Add FAQ.md with sections on triggering, authentication, capabilities, and troubleshooting
- Document key limitations including workflow access, PR creation, and CI results visibility
- Include workarounds for common issues like automated workflows and test result access
- Cover security considerations and best practices for safe usage

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-29 16:45:44 -07:00
Lina Tawfik
35ad5fc467 Add enhanced text sanitization (#83)
* Add enhanced text sanitization

* Format code with prettier

* Refactor tests to remove redundancy and improve structure

- Remove redundant 'mixed input patterns' test from sanitizer.test.ts
- Consolidate integration tests into 2 focused real-world scenarios
- Add HTML comment stripping to sanitizeContent function
- Update test expectations to match sanitization behavior
- Maintain full coverage with fewer, more focused tests

* Fix prettier formatting

* Remove rendered.html from repository

* Remove test-markdown.json and update .gitignore

* Revert .gitignore changes
2025-05-29 16:35:50 -07:00
zenmush
fb7365fba9 fix: Correct mcp_config_file parameter to mcp_config in issue-triage workflow (#89)
The workflow was using 'mcp_config_file' which is not a valid parameter for
the claude-code-base-action. The correct parameter name is 'mcp_config' as
defined in the action.yml file.

This fix ensures that the MCP server configuration is properly passed to the
action, allowing the GitHub MCP server to be correctly initialized.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-29 12:57:57 -07:00
Ashwin Bhat
5a787ed8ab bump base action (#90) 2025-05-29 11:24:24 -07:00
Ashwin Bhat
507e4a6cd1 grant more tools in workflow (#85) 2025-05-29 10:18:16 -07:00
Ashwin Bhat
fcbdac91f2 feat: add base_branch input to specify source branch for new Claude branches (#72)
* feat: add base_branch input to specify source branch for new Claude branches

- Add base_branch input parameter to action.yml allowing users to specify which branch to use as source
- Update setupBranch function to accept and use the base branch parameter  
- Defaults to repository default branch if no base branch is specified
- Addresses issue #62 for better branch control

Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>

* perf: optimize setupBranch to avoid unnecessary default branch fetch

Only fetch repository default branch when actually needed:
- Skip initial fetch when baseBranch is provided
- Fetch default branch at end only for return value and GitHub Actions output
- Eliminates unnecessary API call when users specify base branch

Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>

* fix: properly handle base branch throughout the action workflow

- Fix TypeScript error where defaultBranch was used before being assigned
- Replace DEFAULT_BRANCH with BASE_BRANCH in subsequent workflow steps
- Update PR creation and branch comparison to use the actual base branch
- Ensure custom base_branch input is respected in all operations

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

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

* refactor: move BASE_BRANCH env reading into parseGitHubContext

- Move BASE_BRANCH environment variable reading into parseGitHubContext for consistency
- Update setupBranch to use context.inputs.baseBranch instead of process.env
- Fix test descriptions to correctly reference BASE_BRANCH instead of DEFAULT_BRANCH
- Update test environment setup to use BASE_BRANCH

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

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

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-05-29 10:08:00 -07:00
Marc-Antoine
03e5dcc3a1 Support ANTHROPIC_BASE_URL override from env (#80)
* Support ANTHROPIC_BASE_URL override from env

* prettier

---------

Co-authored-by: Ashwin Bhat <ashwin@anthropic.com>
2025-05-29 10:02:12 -07:00
Ashwin Bhat
52efa5e498 feat: display detailed error messages when prepare step fails (#82)
* feat: display detailed error messages when prepare step fails

- Capture prepare step errors in action.yml (up to 2000 chars)
- Add error details to comment update with collapsible section
- Handle both prepare and Claude execution failures separately
- Add test coverage for error detail display

This helps users debug issues like git errors, permission problems,
and branch creation failures more easily.

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

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

* refactor: simplify error capture to show clean error messages only

- Remove complex shell script that captured full output logs
- Use core.setOutput in prepare.ts to pass clean error message directly
- Avoid exposing potentially sensitive information from logs
- Show only the actual error message (e.g. 'Failed to fetch issue data')

This provides cleaner, more readable error messages without the risk
of exposing sensitive information from debug logs.

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

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

* refactor: simplify error display to show clean error messages only

- Remove collapsible <details> section for error messages
- Display errors in simple code blocks since messages are now clean and short
- Makes error messages more direct and readable

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-29 09:58:52 -07:00
Ashwin Bhat
37c3c29341 feat: allow user override of hardcoded disallowed tools (#71)
* feat: allow user override of hardcoded disallowed tools

Allow users to override hardcoded disallowed tools (WebSearch, WebFetch) by including them in their allowed_tools configuration. This provides users with the ability to control tool access based on their security requirements.

Changes:
- Modified buildDisallowedToolsString() to accept allowedTools parameter
- Added logic to filter out hardcoded disallowed tools if present in allowed tools
- Updated function call site to pass allowedTools
- Added comprehensive test coverage for override behavior
- Maintains backward compatibility

Resolves #49

Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>

* prettier

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>
2025-05-29 09:40:32 -07:00
Ashwin Bhat
9c9859aff1 chore: update claude-code-base-action to v0.0.7 (#84) 2025-05-28 17:20:23 -07:00
Ashwin Bhat
176dbc369d bump base action to 0.0.6 (#79) 2025-05-28 13:19:10 -07:00
Erjan K
8ae72a97c6 Fix readme typo (#58) 2025-05-28 10:20:00 -07:00
Ashwin Bhat
0eb34ae441 Add shallow fetch to improve performance for large repositories (#53)
* Add shallow fetch to improve performance for large repositories

This change adds `--depth=1` to git fetch operations to perform shallow
fetches instead of full history downloads. This significantly reduces
checkout time for large repositories as reported in issue #52.

Changes:
- Line 55: Added --depth=1 to PR branch fetch
- Line 102: Added --depth=1 to new branch fetch

Fixes #52

Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>

* fetch 50 commits for PRs

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: ashwin-ant <ashwin-ant@users.noreply.github.com>
2025-05-27 16:31:06 -07:00
Ashwin Bhat
804959ac41 add issue triage workflow (#70) 2025-05-27 14:04:41 -07:00
Ashwin Bhat
21e17bd590 remove .DS_Store (#69) 2025-05-27 13:26:03 -07:00
Ashwin Bhat
4b925ddf0c Update issue templates (#51) 2025-05-27 13:18:29 -07:00
Ashwin Bhat
253f2c6796 Pin GitHub Action dependencies to commit SHAs for security (#66)
Pin oven-sh/setup-bun and anthropics/claude-code-base-action to specific commit SHAs instead of version tags to ensure reproducible builds and improve supply chain security.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-27 10:14:11 -07:00
Ashwin Bhat
3c6a85b54b Improve error messages for GitHub Action authentication failures (#50)
- Add helpful hint about workflow permissions when OIDC token is not found
- Include response body in app token exchange failure errors for better debugging

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-25 18:43:54 -07:00
Lina Tawfik
cbc3ca285d Merge pull request #39 from anthropics/fix-mcp-undefined-error
Fix MCP file operations server errors
2025-05-23 12:30:01 -07:00
Lina Tawfik
6ce69a1db5 Remove test files to fix typecheck 2025-05-23 11:32:15 -07:00
Lina Tawfik
5b025a2e43 Fix prettier formatting 2025-05-23 11:31:08 -07:00
Lina Tawfik
a29981fe38 Remove inline comments from code 2025-05-23 11:22:47 -07:00
Lina Tawfik
c60a8fb69b Fix MCP server undefined error and file path resolution
- Add error field to MCP error responses to fix 'undefined' errors
- Add REPO_DIR environment variable to fix file path resolution
- Use GITHUB_WORKSPACE for correct repository directory
- Simplify path processing logic in commit_files tool

This fixes the issue where mcp__github_file_ops__commit_files would fail
with 'Error calling tool commit_files: undefined' by ensuring error messages
are properly formatted and files are read from the correct directory.
2025-05-23 11:17:05 -07:00
Lina Tawfik
f3bfb2a9ad Merge pull request #34 from anthropics/update-claude-workflow-v2
Update Claude workflow
2025-05-22 21:51:16 -07:00
Lina Tawfik
36c5ee33cd Update Claude workflow
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 21:43:54 -07:00
Lina Tawfik
8e84799f37 Merge pull request #25 from anthropics/update-to-use-model-parameter
Udpate claude model to default -p model
2025-05-22 11:02:14 -07:00
Lina Tawfik
57ae256d38 Run prettier formatting on README.md
Prettier adjusted the table column spacing for consistency.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 10:58:29 -07:00
Lina Tawfik
d3bb4afed5 Fix table formatting for anthropic_model parameter
The table row was broken across two lines which caused markdown rendering issues.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 10:57:32 -07:00
Lina Tawfik
17cc868124 formatting readme 2025-05-22 10:55:31 -07:00
Lina Tawfik
d822994da0 udpate claude model to default 2025-05-22 10:54:11 -07:00
Lina Tawfik
b129b800c5 Merge pull request #23 from anthropics/np-anthropic-patch-1
Add graphic to readme
2025-05-22 09:26:50 -07:00
Lina Tawfik
80dbb4a5aa Merge pull request #24 from anthropics/update-to-use-model-parameter
Update to use model parameter in claude-code-base-action
2025-05-22 09:19:03 -07:00
Lina Tawfik
1e9ea49f7a Update README example to use model parameter instead of anthropic_model 2025-05-22 09:15:14 -07:00
Lina Tawfik
08e084156a Revert unintended model change in test/mockContext.ts 2025-05-22 09:12:59 -07:00
Lina Tawfik
e67f992a13 Update to use model parameter in claude-code-base-action
This updates claude-code-action to pass the model parameter to claude-code-base-action using the new primary `model` parameter instead of the deprecated `anthropic_model`.

This change is made in conjunction with https://github.com/anthropics/claude-code-base-action/pull/4 which adds the `model` parameter to claude-code-base-action.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 09:10:44 -07:00
Nate Parrott
be7f75d65a fix formatting 2025-05-22 11:12:51 -04:00
np-anthropic
e3d126d058 Add graphic to readme 2025-05-22 10:57:20 -04:00
Lina Tawfik
11f5812e28 Merge pull request #22 from anthropics/lina/rename-anthropic-model-to-model
Rename anthropic_model input to model with backward compatibility
2025-05-22 07:26:42 -07:00
Lina Tawfik
d15de3a8e3 docs: update README examples to use 'model' parameter correctly
- Show model parameter as optional comment for direct API examples
- Keep model parameter required for Bedrock and Vertex AI examples
- Demonstrates the default behavior when model is not specified

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 07:22:13 -07:00
Lina Tawfik
9e23f6d9ed feat: rename anthropic_model input to model with backward compatibility
- Add new 'model' input parameter as the preferred way to specify the model
- Keep 'anthropic_model' for backward compatibility with deprecation notice
- Use expression syntax to prioritize 'model' over 'anthropic_model'
- Update README documentation to reflect the change

This allows existing workflows to continue working while encouraging migration to the cleaner 'model' parameter name.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-22 07:17:18 -07:00
Lina Tawfik
48b327f164 Merge pull request #17 from anthropics/lina/html_comments_strip
Strip HTML comments from GitHub content
2025-05-21 13:29:25 -07:00
Lina Tawfik
dd5e8c974a feat: strip HTML comments from GitHub content
- Add stripHtmlComments function to remove HTML comments from text
- Apply to all GitHub content (bodies, comments, reviews, triggers)
- Add comprehensive tests for comment stripping functionality
2025-05-21 13:23:32 -07:00
Lina Tawfik
c9d5a9d073 Merge pull request #2 from anthropics/lina/modify-action-name
Modify action name
2025-05-19 10:19:17 -07:00
Lina Tawfik
af7824bedd test CI 2025-05-19 10:13:41 -07:00
Lina Tawfik
882785116c test CI 2025-05-19 10:12:47 -07:00
Lina Tawfik
564c4d192c modify action name 2025-05-19 10:00:30 -07:00
Lina Tawfik
ff02ba5722 Merge pull request #1 from anthropics/lina/modify-base-action
Modify base action
2025-05-19 09:45:15 -07:00
Lina Tawfik
bcef581522 modify base action 2025-05-19 09:38:40 -07:00