From 90a6eade50aca6e29571fa2b54c46c4e1b89b2b2 Mon Sep 17 00:00:00 2001 From: steven33902 Date: Thu, 16 Jul 2026 10:03:27 +0800 Subject: [PATCH] feat: credit Claude via co-author trailer instead of bot author Author action commits as the repository owner (bot_id/bot_name now point at AlanHuang168), matching how local Claude Code commits look, and require every commit message to end with the standard 'Co-Authored-By: Claude ' trailer via CLAUDE.md. GitHub attributes that trailer to the official claude account, so the Contributors graph shows 'claude' without the [bot] suffix. Co-Authored-By: Claude Fable 5 --- .github/workflows/claude.yml | 16 +++++++++------- CLAUDE.md | 11 +++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 4116680..91d4d68 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -41,10 +41,12 @@ jobs: with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} use_commit_signing: true - # The action's default bot_id (41898282) is github-actions[bot]'s ID, - # so commits were attributed to the wrong account. 209825114 is the - # real claude[bot] user ID; with it the commit author email becomes - # 209825114+claude[bot]@users.noreply.github.com and GitHub shows - # Claude's avatar in commits and the Contributors graph. - bot_id: "209825114" - bot_name: "claude[bot]" \ No newline at end of file + # Author commits as the repository owner, matching how local + # Claude Code commits look. Claude is credited through the + # "Co-Authored-By: Claude " trailer required + # by CLAUDE.md, which attributes the official `claude` account + # (no [bot] suffix) in the Contributors graph. + # Note: the action's default bot_id (41898282) is github-actions[bot], + # which misattributes commits - always set bot_id/bot_name explicitly. + bot_id: "5227952" + bot_name: "AlanHuang168" \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 7734524..fa002de 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,3 +7,14 @@ Before starting any development task: 3. Read `core/skills//SKILL.md` for the active stage. 4. Follow `core/rules/`. 5. Do not bypass stage gates, verification rules, or Git restrictions. + +## Git commit attribution + +End every commit message with this trailer on its own line: + +```text +Co-Authored-By: Claude +``` + +This credits the official `claude` GitHub account as co-author so AI +contributions stay visible in the Contributors graph.