Commit Graph

93 Commits

Author SHA1 Message Date
claude
308512548e Add comprehensive logging to debug slow job completion
- Add timestamps to prepare.ts completion
- Add timestamps and signal handlers to both MCP servers
- Add start/end logging to update-comment-link.ts
- Add final action completion logging step
- Log when composite action steps complete vs job cleanup
2025-07-29 22:41:27 +00:00
claude
b570f2eb8e Fix OAuth: Add CLAUDE_CODE_OAUTH_TOKEN env var and fix API key handling
- Add CLAUDE_CODE_OAUTH_TOKEN to environment variables for base action
- Don't pass 'use-oauth' as anthropic_api_key to base action
- This should allow Claude Code to detect and use OAuth properly
2025-07-29 21:54:56 +00:00
claude
5bab3fdadc Fix: Add CLAUDE_CREDENTIALS env var back to prepare step
The prepare step needs access to the credentials to extract the OAuth token
2025-07-29 21:36:17 +00:00
claude
8d61fbcfc2 Fix OAuth authentication by using claude_code_oauth_token parameter
- Extract access token from credentials JSON in prepare.ts
- Pass token to base action via claude_code_oauth_token parameter
- Remove unused OAuth setup code and CLAUDE_CREDENTIALS env var
- This uses the official base action's OAuth support correctly
2025-07-29 21:11:18 +00:00
claude
2fb6134aa3 Update claude-code-base-action to latest version v0.0.48
The version we were using (v0.0.24) may not have proper OAuth support. Updating to the latest version to see if OAuth handling has been improved.
2025-07-29 20:40:45 +00:00
claude
bf9b0bc0bb Replace claude-code-base-action with direct Claude Code execution
The claude-code-base-action doesn't support OAuth authentication. This change bypasses the base action entirely and runs Claude Code directly.

Changes:
- Add Node.js setup step
- Add Claude Code installation step
- Replace uses: claude-code-base-action with direct shell script execution
- Handle OAuth by not setting ANTHROPIC_API_KEY when using OAuth
- Set up MCP configuration manually
- Simplify environment variables to only what's needed

This allows OAuth credentials to be used properly since Claude Code will check the credentials file when ANTHROPIC_API_KEY is empty.
2025-07-29 20:38:09 +00:00
claude
de376f197a Workaround OAuth authentication by pretending to use Bedrock
The claude-code-base-action doesn't support OAuth authentication and requires ANTHROPIC_API_KEY when not using cloud providers.

This workaround tells the base action we're using Bedrock when OAuth is specified, which bypasses the API key validation. Since no AWS credentials are provided, Claude Code will fall back to checking for OAuth credentials in the file.

Changes:
- Set use_bedrock=true when anthropic_api_key=='use-oauth'
- Set USE_BEDROCK=true in environment to match
- Pass empty string as anthropic_api_key to base action
2025-07-29 20:13:58 +00:00
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