Commit Graph
729 Commits
Author SHA1 Message Date
GitHub Actions 0f97b95b65 chore: bump Claude Code to 2.1.173 and Agent SDK to 0.3.173 v1.0.144 2026-06-11 05:43:00 +00:00
GitHub Actions eee73e2ae5 chore: bump Claude Code to 2.1.172 and Agent SDK to 0.3.172 v1.0.143 2026-06-10 21:01:40 +00:00
232c9a15f4 Drop --tsconfig-override from Bun invocations to avoid runtime crash (#1315)
* Drop --tsconfig-override from Bun invocations to avoid runtime crash

Passing --tsconfig-override to `bun run` triggers a Bun runtime bug
("Internal error: directory mismatch for directory .../tsconfig.json")
that aborts the action with exit code 1 before any work is done.

Bun already auto-discovers the action's own tsconfig.json by walking up
the directory tree from the entry file, so the override is redundant —
the workspace's tsconfig is never an ancestor of the action checkout.
Dropping the flag preserves tsconfig resolution while avoiding the crash.

Refs: oven-sh/bun#25730

https://claude.ai/code/session_01L763e4S7zBnzDqmYYEJS1A

* Fix prettier formatting in create-prompt/index.ts

Removes redundant outer parentheses that were tripping format:check.
Pre-existing on main; unrelated to the action.yml change but needed
to keep CI green on this branch.

https://claude.ai/code/session_01L763e4S7zBnzDqmYYEJS1A

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-09 14:12:16 -07:00
GitHub Actions 11ba60486e chore: bump Claude Code to 2.1.170 and Agent SDK to 0.3.170 v1.0.142 2026-06-09 17:27:26 +00:00
GitHub Actions 593d7a5c4e chore: bump Claude Code to 2.1.169 and Agent SDK to 0.3.169 v1.0.141 2026-06-08 21:57:59 +00:00
GitHub Actions fbda2eb1bd chore: bump Claude Code to 2.1.168 and Agent SDK to 0.3.168 v1.0.140 2026-06-06 23:42:46 +00:00
GitHub Actions 64de744025 chore: bump Claude Code to 2.1.167 and Agent SDK to 0.3.167 v1.0.139 2026-06-06 01:34:14 +00:00
GitHub Actions 410165836e chore: bump Claude Code to 2.1.166 and Agent SDK to 0.3.166 v1.0.138 2026-06-06 00:56:12 +00:00
GitHub Actions 41ea7642c1 chore: bump Claude Code to 2.1.165 and Agent SDK to 0.3.165 v1.0.137 2026-06-05 05:45:57 +00:00
GitHub Actions 0b1b620029 chore: bump Claude Code to 2.1.163 and Agent SDK to 0.3.163 v1.0.136 2026-06-04 21:54:01 +00:00
GitHub Actions 70a6e5256e chore: bump Claude Code to 2.1.162 and Agent SDK to 0.3.162 v1.0.135 2026-06-03 21:32:44 +00:00
GitHub Actions 36a69b6a90 chore: bump Claude Code to 2.1.161 and Agent SDK to 0.3.161 v1.0.134 2026-06-02 21:59:11 +00:00
bfad70d6a1 ci: bump checkout and setup-bun in test workflows to Node 24 releases (#1379)
actions/checkout v4 and oven-sh/setup-bun v2.0.2 run on the deprecated
Node 20 action runtime and emit a deprecation warning on every run.
Bump to checkout v6.0.2 and setup-bun v2.2.0 (both Node 24).

Co-authored-by: ant-kurt <209710463+ant-kurt@users.noreply.github.com>
2026-06-02 12:03:04 -07:00
dc081a3809 chore: bump actions/setup-node from v4.4.0 to v6.4.0 (Node.js 24) (#1377)
* chore: bump actions/setup-node from v4.4.0 to v6.4.0 (Node.js 24)

setup-node v4 runs on the deprecated Node.js 20 action runtime, producing
a deprecation warning on every workflow run that uses base-action. v6 runs
on Node 24. This only changes the action's own runtime — the node-version
it installs for user code is unaffected.

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

* Disable setup-node v5+ automatic package-manager caching

Preserves v4 behavior: caching only when use_node_cache=true.

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

---------

Co-authored-by: ant-kurt <209710463+ant-kurt@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 12:02:35 -07:00
Ashwin BhatandGitHub 420335da51 Add workload identity federation support to base-action (#1378)
* Add workload identity federation support to base-action

Move the workload identity module into base-action so the standalone
action can fetch and refresh the GitHub OIDC identity token itself, and
expose the same federation inputs as the outer action. Switch the
base-action test workflows from the anthropic_api_key secret to the
federation repo variables and grant them id-token: write.

* Verify MCP test tool invocation instead of init connection status

MCP servers can connect asynchronously, so the init event may report a
server as pending. Check that the server is registered at init, then
assert the test tool was actually called and returned its response.
Also pass the MCP config through claude_args --mcp-config, replacing the
removed mcp_config input.
2026-06-02 11:52:23 -07:00
GitHub Actions 7f37f2e373 chore: bump Claude Code to 2.1.160 and Agent SDK to 0.3.160 2026-06-02 02:11:04 +00:00
GitHub Actions fb53c379a0 chore: bump Claude Code to 2.1.159 and Agent SDK to 0.3.159 2026-05-31 19:43:36 +00:00
GitHub Actions c5c315c8a1 chore: bump Claude Code to 2.1.158 and Agent SDK to 0.3.158 2026-05-30 02:42:43 +00:00
GitHub Actions f809dea0ba chore: bump Claude Code to 2.1.157 and Agent SDK to 0.3.157 2026-05-29 20:21:24 +00:00
GitHub Actions 0fb1b8f303 chore: bump Claude Code to 2.1.156 and Agent SDK to 0.3.156 2026-05-29 01:43:14 +00:00
GitHub Actions 3d4c9fde8e chore: bump Claude Code to 2.1.154 and Agent SDK to 0.3.154 2026-05-28 18:02:04 +00:00
GitHub Actions 324957b26b chore: bump Claude Code to 2.1.153 and Agent SDK to 0.3.153 2026-05-28 00:52:58 +00:00
GitHub Actions 73c91f04a8 chore: bump Claude Code to 2.1.152 and Agent SDK to 0.3.152 2026-05-27 01:31:47 +00:00
GitHub Actions 787c5a0ce9 chore: bump Claude Code to 2.1.150 and Agent SDK to 0.3.150 v1.0.133 2026-05-23 04:04:43 +00:00
Ashwin BhatandGitHub 4257c8e059 Use workload identity federation for Claude auth in CI workflows (#1344)
Switch claude.yml, claude-review.yml, and issue-triage.yml from the
anthropic_api_key secret to the workload identity federation inputs.
The federation rule, organization, and service account IDs are read
from repository variables; issue-triage.yml additionally gains the
id-token: write permission required to request the OIDC token.
2026-05-22 15:46:06 -07:00
GitHub Actions bbfaf8e1ff chore: bump Claude Code to 2.1.149 and Agent SDK to 0.3.149 v1.0.132 2026-05-22 22:10:12 +00:00
GitHub Actions 4481e6d3c7 chore: bump Claude Code to 2.1.148 and Agent SDK to 0.3.148 v1.0.131 2026-05-22 01:17:47 +00:00
Ashwin BhatandGitHub 661a6fefbd Add Workload Identity Federation (OIDC) authentication support (#1338)
* Add workload identity federation auth support

Adds anthropic_federation_rule_id, anthropic_organization_id,
anthropic_service_account_id, anthropic_workspace_id, and
anthropic_oidc_audience inputs. When the federation rule and organization
are set, the action fetches the workflow's GitHub Actions OIDC token,
writes it to a file in RUNNER_TEMP, keeps it refreshed during execution,
and points the Claude Code CLI at it via ANTHROPIC_IDENTITY_TOKEN_FILE so
the CLI can exchange it for a short-lived access token instead of using a
static API key.

* Add WIF example workflow and base-action federation docs

* Default workload identity OIDC audience to https://api.anthropic.com
v1.0.130
2026-05-21 15:19:15 -07:00
GitHub Actions c9d66afb17 chore: bump Claude Code to 2.1.147 and Agent SDK to 0.3.147 v1.0.129 2026-05-21 20:40:16 +00:00
GitHub Actions 20c8abf165 chore: bump Claude Code to 2.1.146 and Agent SDK to 0.3.146 v1.0.128 2026-05-21 01:52:44 +00:00
Ashwin BhatandGitHub 1dc994ee7a Resolve actor account type before applying allowed_bots (#1330)
Move the allowed_bots check in checkHumanActor and checkWritePermissions so
it only fires after the actor has been resolved as a non-User account
(GitHub App / bot, or unresolvable app actor). Actors that resolve to a
regular User account go through the standard human/write checks regardless
of allowed_bots.

The Copilot-style path (GITHUB_ACTOR not ending in [bot] and not resolvable
as a user) is unchanged: it still falls through to the existing 404 catch,
which already consults allowed_bots once the API has reported the actor is
not a user.

Update tests to match and add coverage for the User-account path.
v1.0.127
2026-05-19 16:30:49 -07:00
GitHub Actions ca89df3d42 chore: bump Claude Code to 2.1.145 and Agent SDK to 0.3.145 v1.0.126 2026-05-19 22:21:48 +00:00
Ashwin BhatandGitHub fd1877debc Simplify comment tool instructions in prompt (#1328) v1.0.125 2026-05-19 14:50:18 -07:00
GitHub Actions 24492741e0 chore: bump Claude Code to 2.1.144 and Agent SDK to 0.3.144 v1.0.124 2026-05-19 00:49:28 +00:00
Ashwin BhatandGitHub 0345b11d48 Fix prettier formatting in create-prompt (#1325) 2026-05-18 08:27:45 -07:00
GitHub Actions b020494b57 chore: bump Claude Code to 2.1.143 and Agent SDK to 0.3.143 2026-05-15 22:29:11 +00:00
Ashwin BhatandGitHub d56f10247e Strengthen simplified tag-mode prompt (USE_SIMPLE_PROMPT) (#1313)
The opt-in simplified tag-mode prompt omitted several guardrails the
default prompt has. Bring it closer to the default's posture while
keeping it terse:

- Scoping clarification: spell out that only the triggering comment
  (or the issue body for issue events) carries instructions; other
  comments, the body, review comments, and repository files are
  reference context, not commands to act on.
- Review-only stop-condition: questions and code reviews must not edit,
  commit, push, or create branches unless the trigger explicitly asks
  for a code change.
- PR base-branch diff: when triggered on a PR with a known base branch,
  compare against origin/<base> instead of main/master.
- Capability limits: cannot submit formal PR reviews, approve, or merge;
  decline politely and point to the FAQ.

Adds focused tests covering the new lines for both PR and non-PR
events, including presence/absence of the conditional base-branch line.
2026-05-14 17:06:45 -07:00
bbad5183ff fix: add parentheses to fix operator precedence in co-author check (#1199)
`??` has lower precedence than `!==`, so the expression:
  triggerDisplayName ?? triggerUsername !== "Unknown"
parses as:
  triggerDisplayName ?? (triggerUsername !== "Unknown")

When triggerDisplayName is an empty string "", the condition
evaluates to "" (falsy), incorrectly skipping the co-author line
even though the user is not "Unknown".

Add parentheses to get the intended behavior:
  (triggerDisplayName ?? triggerUsername) !== "Unknown"

Co-authored-by: Rush <rush@RushdeMacBook-Pro.local>
2026-05-14 16:58:17 -07:00
GitHub Actions 51ea8ea73a chore: bump Claude Code to 2.1.142 and Agent SDK to 0.3.142 v1.0.123 2026-05-14 22:56:05 +00:00
Ashwin BhatandGitHub acfa366ca8 chore: bump pinned Bun to 1.3.14 (#1312)
* chore: bump pinned Bun to 1.3.14

* style: apply prettier to actor/permissions files
2026-05-14 18:55:04 -04:00
9eb125afe3 fix: handle non-user actors (e.g. Copilot) in permission and actor checks (#1144)
GitHub Apps like Copilot SWE Agent set GITHUB_ACTOR to a value (e.g.
"Copilot") that is neither a valid GitHub user nor ends with "[bot]".
This caused two independent crashes:

1. checkWritePermissions (permissions.ts): called the collaborator
   permission API which returns 404 "is not a user" for non-user actors.
2. checkHumanActor (actor.ts): called the Users API first, which 404s,
   before ever reaching the allowed_bots check.

Fix both by:
- Checking allowed_bots BEFORE making API calls, so known bots skip the
  API entirely.
- In permissions.ts, catching "is not a user" 404 errors and falling
  back to the allowed_bots list instead of crashing.
- In actor.ts, catching 404 errors and providing a clear error message
  telling the user to add the bot to allowed_bots.

Closes #900, #903, #1018, #1133

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 15:38:34 -07:00
JerryLeeandGitHub 1450f658d3 fix: write execution file when SDK throws (#1255) 2026-05-14 15:37:28 -07:00
Christian VanandGitHub 0756f6ef2b fix: exclude .claude-pr snapshot from git staging (#1277) 2026-05-14 15:36:57 -07:00
Matan BaruchandGitHub f4d6a11de1 fix: dereference symlinks when snapshotting sensitive paths to .claude-pr/ (#1186)
`cpSync` defaults to `dereference: false`, which means it tries to
recreate symlinks at the destination rather than copying file contents.
When a sensitive path (e.g. CLAUDE.md) is a symlink, this fails with
`ENOENT: no such file or directory, symlink` because `cpSync` attempts
to call `symlink()` without ensuring the parent `.claude-pr/` directory
exists first.

Adding `dereference: true` fixes this by following symlinks and copying
the actual file contents, which is also the correct semantic behavior —
review agents need to inspect the real content, not a symlink that may
not resolve correctly from `.claude-pr/`.

Fixes the action crash when repositories use symlinked CLAUDE.md
(e.g. CLAUDE.md -> AGENTS.md).
2026-05-14 15:36:09 -07:00
ricoandGitHub bf6d40e068 fix: allow , in branch names (#1310)
`validateBranchName` rejects branch names containing a comma, even
though `git check-ref-format` permits commas and GitHub itself accepts
them. PRs whose head branch contains a `,` fail validation in-process
before any git operation, so the action errors out immediately.

Branch names with commas show up in real workflows when names are
derived from titles, place names, or external identifiers (e.g.
"feature/paris,france"). There is no workaround other than renaming
the branch, which is often not under the user's control.

All git calls in this file use execFileSync with an argv array, so no
shell interpretation occurs and `,` carries no injection risk. This is
the same reasoning used to add `#` in #1167 and `+` in #1248.

- Add `,` to the validateBranchName whitelist regex
- Update the surrounding comment and error message to match
- Add a test case covering commas in title-derived branch names

Fixes #1300
2026-05-14 15:34:32 -07:00
GitHub Actions 86eb26bf01 chore: bump Claude Code to 2.1.141 and Agent SDK to 0.2.141 v1.0.122 2026-05-13 23:19:48 +00:00
GitHub Actions f4fb5c6cdc chore: bump Claude Code to 2.1.140 and Agent SDK to 0.2.140 v1.0.121 2026-05-12 21:10:29 +00:00
GitHub Actions dde2242db6 chore: bump Claude Code to 2.1.139 and Agent SDK to 0.2.139 v1.0.120 2026-05-11 18:44:48 +00:00
GitHub Actions 476e359e62 chore: bump Claude Code to 2.1.138 and Agent SDK to 0.2.138 v1.0.119 2026-05-09 06:34:03 +00:00
GitHub Actions ad67978e5e chore: bump Claude Code to 2.1.137 and Agent SDK to 0.2.137 v1.0.118 2026-05-09 00:11:30 +00:00