Commit Graph

86 Commits

Author SHA1 Message Date
claude
4f5899b843 Fix anthropic_api_key parameter passed to claude-code-base-action
Don't pass 'use-oauth' value to the base action when using OAuth authentication. This allows Claude Code to properly detect and use the OAuth credentials file instead of trying to use 'use-oauth' as an API key.
2025-07-29 19:58:44 +00:00
claude
5342a9c5f9 Fix OAuth detection in prepare.ts
The OAuth setup was checking for ANTHROPIC_API_KEY === 'use-oauth', but the modified action.yml sets it to empty string when using OAuth. Updated to check for empty API key instead.

This allows the OAuth credentials to be properly written to the container when using Claude Code MAX authentication.
2025-07-29 19:39:40 +00:00
claude
726dc5a858 updated to hopefully fix oauth auth 2025-07-29 19:17:43 +00:00
woehrer12
1fd3bbc91b chore: claude-code to v0.0.24 (#3) 2025-07-06 22:48:46 +01:00
Mark Wylde
a8399fe052 Merge pull request #2 from zinglax/shallow-fetch
Adding --depth=1 to fetchs to save time for large repos
2025-06-06 08:54:50 +01:00
zinglax
f640f38102 Adding --depth=1 to fetchs to save time
See https://github.com/anthropics/claude-code-action/issues/52
2025-06-04 09:44:05 -04:00
Mark Wylde
54147e92b6 fix: follow commit convention 2025-06-01 12:21:05 +01:00
Mark Wylde
42d3e56b56 fix: encourage use of mcp__gitea__list_branches 2025-05-31 13:54:12 +01:00
Mark Wylde
2c9043d65f fix: prompt 2025-05-31 13:46:05 +01:00
Mark Wylde
957f0ddc6f fix: encourage tool use over link 2025-05-31 13:35:56 +01:00
Mark Wylde
4005d690a8 fix: syntax 2025-05-31 13:30:39 +01:00
Mark Wylde
319e236b21 chore: remove stuff from prompt 2025-05-31 13:23:04 +01:00
Mark Wylde
b4448a4e51 fix: explain how to create pull request 2025-05-31 13:17:39 +01:00
Mark Wylde
163b16a5a5 chore: remove generated by 2025-05-31 13:07:49 +01:00
Mark Wylde
fd513046fa chore: remove generated by 2025-05-31 13:07:20 +01:00
Mark Wylde
aaeb014ca6 chore: refactor prompt for gitea 2025-05-31 13:00:23 +01:00
Mark Wylde
56b03c7993 feat: add more gitea mcp tools 2025-05-31 12:47:44 +01:00
Mark Wylde
46a306ccf2 chore: reduce readme 2025-05-31 11:33:49 +01:00
Mark Wylde
c6c6a613c8 chore: update screenshot for readme 2025-05-31 11:16:32 +01:00
Mark Wylde
2d1c93ebd2 chore: update screenshot for readme 2025-05-31 11:14:53 +01:00
Mark Wylde
87eac76ba0 feat: add optional claude name and email for git 2025-05-31 10:55:35 +01:00
Mark Wylde
96524bd1d8 chore: update readme with claude max info 2025-05-31 10:48:40 +01:00
Mark Wylde
0a1983379e Implement claude max auth 2025-05-31 10:14:51 +01:00
Mark Wylde
90c7a171fc Merge branch 'main' of github.com:anthropics/claude-code-action into gitea 2025-05-31 09:49:56 +01:00
Mark Wylde
07ce5612a4 chore: update readme version 2025-05-31 09:49:49 +01:00
Mark Wylde
d2b03c9183 Merge branch 'feat/give-claude-access-to-switch-branch' of github.com:markwylde/claude-code-gitea-action into gitea 2025-05-31 09:48:49 +01:00
Mark Wylde
05a2e7ea87 fix 2025-05-31 09:45:52 +01:00
Mark Wylde
4b26673a39 Merge pull request #1 from markwylde/feat/give-claude-access-to-switch-branch
Give claude access to switch branch
2025-05-31 09:38:17 +01:00
Mark Wylde
ccf7081358 improve git logic 2025-05-31 09:36:25 +01:00
Mark Wylde
5c040da573 Fix job id 2025-05-31 09:26:06 +01:00
Mark Wylde
e5b2574f8c Implement switch branch 2025-05-31 09:20:48 +01:00
Mark Wylde
799a5cd961 chore: update readme version 2025-05-31 09:08:46 +01:00
Mark Wylde
8406629c9f chore: add screenshot to readme 2025-05-31 09:07:46 +01:00
Mark Wylde
9714bd59a5 chore: simplify action config 2025-05-31 09:03:12 +01:00
Mark Wylde
fb6df649ed v1.0.1 2025-05-31 01:23:37 +01:00
Ashwin Bhat
a8a36ced96 fix mistake in FAQ (#100) 2025-05-30 12:33:15 -07: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