mirror of
https://github.com/markwylde/claude-code-gitea-action.git
synced 2026-02-19 18:12:50 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fd3bbc91b | ||
|
|
a8399fe052 | ||
|
|
f640f38102 | ||
|
|
54147e92b6 |
@@ -113,7 +113,7 @@ runs:
|
||||
- name: Run Claude Code
|
||||
id: claude-code
|
||||
if: steps.prepare.outputs.contains_trigger == 'true'
|
||||
uses: anthropics/claude-code-base-action@c8e31bd52d9a149b3f8309d7978c6edaa282688d # v0.0.8
|
||||
uses: anthropics/claude-code-base-action@v0.0.24
|
||||
with:
|
||||
prompt_file: /tmp/claude-prompts/claude-prompt.txt
|
||||
allowed_tools: ${{ env.ALLOWED_TOOLS }}
|
||||
|
||||
@@ -566,6 +566,7 @@ ${
|
||||
eventData.isPR && !eventData.claudeBranch
|
||||
? `
|
||||
- Commit changes using mcp__local_git_ops__commit_files to the existing branch (works for both new and existing files).
|
||||
- Make sure commits follow the same convention as other commits in the repository.
|
||||
- Use mcp__local_git_ops__commit_files to commit files atomically in a single commit (supports single or multiple files).
|
||||
- CRITICAL: After committing, you MUST push the branch to the remote repository using mcp__local_git_ops__push_branch
|
||||
- After pushing, you MUST create a PR using mcp__local_git_ops__create_pull_request.
|
||||
@@ -574,6 +575,7 @@ ${
|
||||
? `
|
||||
- You are already on the correct branch (${eventData.claudeBranch}). Do not create a new branch.
|
||||
- Commit changes using mcp__local_git_ops__commit_files (works for both new and existing files)
|
||||
- Make sure commits follow the same convention as other commits in the repository.
|
||||
- Use mcp__local_git_ops__commit_files to commit files atomically in a single commit (supports single or multiple files).
|
||||
- CRITICAL: After committing, you MUST push the branch to the remote repository using mcp__local_git_ops__push_branch
|
||||
`
|
||||
|
||||
@@ -52,7 +52,7 @@ export async function setupBranch(
|
||||
);
|
||||
|
||||
// Check out the base branch and let Claude create branches as needed
|
||||
await $`git fetch origin ${sourceBranch}`;
|
||||
await $`git fetch origin --depth=1 ${sourceBranch}`;
|
||||
await $`git checkout ${sourceBranch}`;
|
||||
await $`git pull origin ${sourceBranch}`;
|
||||
|
||||
@@ -99,7 +99,7 @@ export async function setupBranch(
|
||||
|
||||
// Ensure we have the latest version of the source branch
|
||||
console.log(`Fetching latest ${sourceBranch}...`);
|
||||
await $`git fetch origin ${sourceBranch}`;
|
||||
await $`git fetch origin --depth=1 ${sourceBranch}`;
|
||||
|
||||
// Checkout the source branch
|
||||
console.log(`Checking out ${sourceBranch}...`);
|
||||
|
||||
@@ -85,7 +85,7 @@ export async function branchHasChanges(
|
||||
*/
|
||||
export async function fetchBranch(branchName: string): Promise<boolean> {
|
||||
try {
|
||||
await $`git fetch origin ${branchName}`;
|
||||
await $`git fetch origin --depth=1 ${branchName}`;
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user