anthropics / anthropics/claude-code-action

[BUG] CLAUDE_APP_BOT_ID constant uses github-actions[bot] ID (41898282) instead of claude[bot] ID (209825114)

Abierto
#759 2 comentarios 5 reacciones 0 asignados Ver en GitHub
bug p2
Lenguaje dominante
TypeScript
Estrellas
8.9k
Forks
2.1k
Merge medio
3 d 9 h
PR fusionados (30 d)
10

Descripción

## Describe the bug

The `CLAUDE_APP_BOT_ID` constant in `src/github/constants.ts` is set to `41898282`, which is actually the ID for `github-actions[bot]`, not `claude[bot]`.

The correct ID for `claude[bot]` is `209825114`.

## Evidence

Verified via GitHub API:
```json
{"id": 41898282, "login": "github-actions[bot]", "type": "Bot"}
{"id": 209825114, "login": "claude[bot]", "type": "Bot"}
```

Looking at `action.yml`, the defaults are:
- `bot_id: "41898282"` ← WRONG (this is github-actions[bot])
- `bot_name: "claude[bot]"` ← Correct name, but mismatched with ID

## Impact

When commits are made via git CLI (fallback when API commit signing fails), the commits have:
- Author: `41898282+claude[bot]@users.noreply.github.com`
- This creates an identity mismatch and results in **unsigned commits**

Compare to correctly-signed commits made via GitHub API:
- Author: `209825114+claude[bot]@users.noreply.github.com`
- Committer: `GitHub `
- These are **verified/signed** by GitHub

## Reproduction

1. Enable `use_commit_signing: true` in a workflow
2. Trigger Claude to make a commit
3. In some cases, commits fall back to git CLI instead of API
4. These commits show as unsigned in GitHub

## Workaround

Explicitly set the correct `bot_id` in workflow:
```yaml
- uses: anthropics/claude-code-action@v1
with:
use_commit_signing: true
bot_id: "209825114" # ← Workaround: correct claude[bot] ID
```

## Suggested Fix

Update `src/github/constants.ts`:
```typescript
// Before (incorrect)
export const CLAUDE_APP_BOT_ID = 41898282;

// After (correct)
export const CLAUDE_APP_BOT_ID = 209825114;
```

And update the default in `action.yml`:
```yaml
bot_id:
description: "GitHub user ID to use for git operations"
required: false
default: "209825114" # claude[bot] ID
```

## Related

This may be related to #281 / #282 (commits not verified), though those issues focus on when git CLI is used rather than the incorrect bot ID.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.