Merge pull request 'docs: rename bot from claude-bot to claude in CI and docs' (#12) from claude/issue-11-20260225-2020 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/12
This commit is contained in:
commit
095c2c2429
3 files changed
+11
-11
No files matched your search
@@ -39,7 +39,7 @@ jobs:
|
|||||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
||||||
bot_id: "48"
|
bot_id: "48"
|
||||||
bot_name: "claude-bot"
|
bot_name: "claude"
|
||||||
bot_email: "claude@wxs.ro"
|
bot_email: "claude@wxs.ro"
|
||||||
platform: "forgejo"
|
platform: "forgejo"
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ This fork adds Forgejo support via a lean adapter pattern — only 4 genuinely d
|
|||||||
|
|
||||||
All other `src/github/` modules work on Forgejo via Octokit REST as-is (permissions, comments, branches, git config, context, formatter).
|
All other `src/github/` modules work on Forgejo via Octokit REST as-is (permissions, comments, branches, git config, context, formatter).
|
||||||
|
|
||||||
**Bot identity on Forgejo**: A dedicated `claude-bot` user provides bot identity (like GitHub's `claude[bot]`). The `bot_id`, `bot_name`, and `bot_email` action inputs control git commit attribution. When `bot_email` is set, it overrides the default noreply email format — set it to the bot user's registered email so Forgejo links commits to the profile. See `docs/forgejo.md` for setup.
|
**Bot identity on Forgejo**: A dedicated `claude` user provides bot identity (like GitHub's `claude[bot]`). The `bot_id`, `bot_name`, and `bot_email` action inputs control git commit attribution. When `bot_email` is set, it overrides the default noreply email format — set it to the bot user's registered email so Forgejo links commits to the profile. See `docs/forgejo.md` for setup.
|
||||||
|
|
||||||
**Key integration points** (these files have platform branches and are merge-conflict surface):
|
**Key integration points** (these files have platform branches and are merge-conflict surface):
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -44,7 +44,7 @@ jobs:
|
|||||||
platform: "forgejo"
|
platform: "forgejo"
|
||||||
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
||||||
bot_id: "YOUR_BOT_ID" # Replace with your bot's Forgejo user ID (see step 5 below)
|
bot_id: "YOUR_BOT_ID" # Replace with your bot's Forgejo user ID (see step 5 below)
|
||||||
bot_name: "claude-bot"
|
bot_name: "claude"
|
||||||
bot_email: "claude@yourdomain.com" # Must match the bot user's registered email
|
bot_email: "claude@yourdomain.com" # Must match the bot user's registered email
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
platform: "forgejo"
|
platform: "forgejo"
|
||||||
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
||||||
bot_id: "YOUR_BOT_ID" # Replace with your bot's Forgejo user ID
|
bot_id: "YOUR_BOT_ID" # Replace with your bot's Forgejo user ID
|
||||||
bot_name: "claude-bot"
|
bot_name: "claude"
|
||||||
bot_email: "claude@yourdomain.com"
|
bot_email: "claude@yourdomain.com"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ On GitHub, Claude gets its own identity via the GitHub App (`claude[bot]`). On F
|
|||||||
|
|
||||||
Creating a dedicated bot user solves this:
|
Creating a dedicated bot user solves this:
|
||||||
|
|
||||||
- **Clear attribution**: Commits and comments show as `claude-bot`, not your personal account
|
- **Clear attribution**: Commits and comments show as `claude`, not your personal account
|
||||||
- **Least privilege**: The bot token has only the permissions Claude needs
|
- **Least privilege**: The bot token has only the permissions Claude needs
|
||||||
- **Audit trail**: Easy to distinguish human actions from bot actions in repo history
|
- **Audit trail**: Easy to distinguish human actions from bot actions in repo history
|
||||||
- **Security**: If the action is compromised, only the bot's scoped token is exposed
|
- **Security**: If the action is compromised, only the bot's scoped token is exposed
|
||||||
@@ -151,7 +151,7 @@ Creating a dedicated bot user solves this:
|
|||||||
|
|
||||||
Go to **Site Administration > User Accounts > Create User Account** or use the admin API:
|
Go to **Site Administration > User Accounts > Create User Account** or use the admin API:
|
||||||
|
|
||||||
- **Username**: `claude-bot`
|
- **Username**: `claude`
|
||||||
- **Email**: e.g., `claude@yourdomain.com`
|
- **Email**: e.g., `claude@yourdomain.com`
|
||||||
- **Password**: any strong password (you'll use API tokens, not password login)
|
- **Password**: any strong password (you'll use API tokens, not password login)
|
||||||
- **Uncheck** "Require user to change password"
|
- **Uncheck** "Require user to change password"
|
||||||
@@ -166,11 +166,11 @@ For each organization where Claude should operate:
|
|||||||
2. Create a team named `Claude` with:
|
2. Create a team named `Claude` with:
|
||||||
- **Permission**: `Write`
|
- **Permission**: `Write`
|
||||||
- **Access**: All Repositories (so new repos are automatically covered)
|
- **Access**: All Repositories (so new repos are automatically covered)
|
||||||
3. Add `claude-bot` to the team's **Members**
|
3. Add `claude` to the team's **Members**
|
||||||
|
|
||||||
#### 3. Generate a scoped API token
|
#### 3. Generate a scoped API token
|
||||||
|
|
||||||
Log in as `claude-bot`, go to **Settings > Applications**, and create a token:
|
Log in as `claude`, go to **Settings > Applications**, and create a token:
|
||||||
|
|
||||||
- **Token Name**: `claude-code-action`
|
- **Token Name**: `claude-code-action`
|
||||||
- **Scopes**:
|
- **Scopes**:
|
||||||
@@ -187,7 +187,7 @@ Add the token as `CLAUDE_BOT_TOKEN` at the **organization level** (Settings > Ac
|
|||||||
You'll need the Forgejo user ID for the `bot_id` input:
|
You'll need the Forgejo user ID for the `bot_id` input:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -s "https://your-forgejo-instance/api/v1/users/claude-bot" | jq '.id'
|
curl -s "https://your-forgejo-instance/api/v1/users/claude" | jq '.id'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 6. Configure the workflow
|
#### 6. Configure the workflow
|
||||||
@@ -199,7 +199,7 @@ curl -s "https://your-forgejo-instance/api/v1/users/claude-bot" | jq '.id'
|
|||||||
platform: "forgejo"
|
platform: "forgejo"
|
||||||
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
github_token: ${{ secrets.CLAUDE_BOT_TOKEN }}
|
||||||
bot_id: "YOUR_BOT_ID" # Replace with the ID from step 5
|
bot_id: "YOUR_BOT_ID" # Replace with the ID from step 5
|
||||||
bot_name: "claude-bot"
|
bot_name: "claude"
|
||||||
bot_email: "claude@yourdomain.com" # Must match the bot user's registered email
|
bot_email: "claude@yourdomain.com" # Must match the bot user's registered email
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ The `bot_email` input overrides the default noreply email format. When it matche
|
|||||||
Forgejo API tokens can expire. Plan for rotation:
|
Forgejo API tokens can expire. Plan for rotation:
|
||||||
|
|
||||||
1. **Set a calendar reminder** for before the token expires
|
1. **Set a calendar reminder** for before the token expires
|
||||||
2. **Generate a new token** by logging in as `claude-bot` (same scopes as above)
|
2. **Generate a new token** by logging in as `claude` (same scopes as above)
|
||||||
3. **Update the org secret** `CLAUDE_BOT_TOKEN` with the new token value
|
3. **Update the org secret** `CLAUDE_BOT_TOKEN` with the new token value
|
||||||
4. **No code changes needed** — the workflow reads the secret at runtime
|
4. **No code changes needed** — the workflow reads the secret at runtime
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user