mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 23:14:13 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93df09fd88 | ||
|
|
d290268f83 | ||
|
|
d69f61e377 |
@@ -193,7 +193,8 @@ runs:
|
||||
# Run the base-action
|
||||
cd ${GITHUB_ACTION_PATH}/base-action
|
||||
bun install
|
||||
bun run src/index.ts
|
||||
cd -
|
||||
bun run ${GITHUB_ACTION_PATH}/base-action/src/index.ts
|
||||
env:
|
||||
# Base-action inputs
|
||||
CLAUDE_CODE_ACTION: "1"
|
||||
|
||||
@@ -694,8 +694,7 @@ What You CANNOT Do:
|
||||
- Submit formal GitHub PR reviews
|
||||
- Approve pull requests (for security reasons)
|
||||
- Post multiple comments (you only update your initial comment)
|
||||
- Execute commands outside the repository context
|
||||
- Run arbitrary Bash commands (unless explicitly allowed via allowed_tools configuration)
|
||||
- Execute commands outside the repository context${useCommitSigning ? "\n- Run arbitrary Bash commands (unless explicitly allowed via allowed_tools configuration)" : ""}
|
||||
- Perform branch operations (cannot merge branches, rebase, or perform other git operations beyond pushing commits)
|
||||
- Modify files in the .github/workflows directory (GitHub App permissions do not allow workflow modifications)
|
||||
- View CI/CD results or workflow run outputs (cannot access GitHub Actions logs or test results)
|
||||
|
||||
@@ -116,6 +116,11 @@ export async function setupBranch(
|
||||
`Branch name generated: ${newBranch} (will be created by file ops server on first commit)`,
|
||||
);
|
||||
|
||||
// Ensure we're on the source branch
|
||||
console.log(`Fetching and checking out source branch: ${sourceBranch}`);
|
||||
await $`git fetch origin ${sourceBranch} --depth=1`;
|
||||
await $`git checkout ${sourceBranch}`;
|
||||
|
||||
// Set outputs for GitHub Actions
|
||||
core.setOutput("CLAUDE_BRANCH", newBranch);
|
||||
core.setOutput("BASE_BRANCH", sourceBranch);
|
||||
@@ -131,7 +136,12 @@ export async function setupBranch(
|
||||
`Creating local branch ${newBranch} for ${entityType} #${entityNumber} from source branch: ${sourceBranch}...`,
|
||||
);
|
||||
|
||||
// Create and checkout the new branch locally
|
||||
// Fetch and checkout the source branch first to ensure we branch from the correct base
|
||||
console.log(`Fetching and checking out source branch: ${sourceBranch}`);
|
||||
await $`git fetch origin ${sourceBranch} --depth=1`;
|
||||
await $`git checkout ${sourceBranch}`;
|
||||
|
||||
// Create and checkout the new branch from the source branch
|
||||
await $`git checkout -b ${newBranch}`;
|
||||
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user