Skip to content

Commit 6f097bb

Browse files
fix(sync): commit baseline as codeboarding-review[bot], not codeboarding[bot]
Sync baseline commits hardcoded the author email codeboarding[bot]@users.noreply.github.com, which GitHub resolves to a third-party personal GitHub App (owned by an unrelated user) — so commits showed that user's photo as the avatar instead of the CodeBoarding logo. Attribute commits to codeboarding-review[bot] (app_id 4021464), the same CodeBoarding App that already posts the PR review comments, so the commit avatar is the CodeBoarding logo. Requires that App to have contents:write and its token wired as push_token (see codeboarding-sync.yml). The regen-loop guard now matches both the new and legacy bot emails so baselines committed before this change don't re-trigger sync on the next push. README updated to reflect the new identity and the github-actions[bot] fallback when no App token is configured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9a8e338 commit 6f097bb

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/codeboarding-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
# and target repo into subdirectories, so this local checkout is untouched.
5353
- uses: actions/checkout@v4
5454
# Mint the CodeBoarding GitHub App token so the baseline commit lands as
55-
# codeboarding[bot] (App avatar = the CodeBoarding logo) instead of the
56-
# generic github-actions[bot]. Mirrors the review workflow's token flow.
55+
# codeboarding-review[bot] (App avatar = the CodeBoarding logo) instead of
56+
# the generic github-actions[bot]. Mirrors the review workflow's token flow.
5757
# Fails open: when App credentials are absent/invalid we fall back to
5858
# github.token below, and the commit shows the default Actions identity.
5959
# End-user repos can't reuse this — the App private key is never shipped to

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ In review workflows that include `issue_comment`, anyone whose comment reaches t
173173

174174
## Keep your architecture versioned (sync mode)
175175

176-
With `mode: sync`, the action analyzes the pushed commit and commits the results back to the branch (as `codeboarding[bot]`), so your architecture analysis stays versioned in git and tracks the code instead of drifting from it:
176+
With `mode: sync`, the action analyzes the pushed commit and commits the results back to the branch (as `codeboarding-review[bot]` when the CodeBoarding GitHub App token is configured, otherwise `github-actions[bot]`), so your architecture analysis stays versioned in git and tracks the code instead of drifting from it:
177177

178178
- `.codeboarding/*.md` — rendered architecture docs: `overview.md` plus one page per component (directory configurable via `output_dir`).
179179
- `.codeboarding/analysis.json` — the machine-readable analysis, which doubles as the baseline that review mode diffs against.

action.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,20 @@ runs:
231231
skip "Sync mode runs on branch pushes, not tag pushes."
232232
fi
233233
# Regen-loop guard: never re-analyze our OWN baseline commit. Sync
234-
# commits as codeboarding[bot]; if a push's head commit is ours, skip.
234+
# commits as codeboarding-review[bot]; if a push's head commit is ours,
235+
# skip. The legacy codeboarding[bot] email is still matched so baselines
236+
# committed before the identity change don't re-trigger on the next push.
235237
# This holds even if a consumer omits the workflow's paths-ignore (the
236238
# primary guard), and replaces the old "[skip ci]" marker — which
237239
# leaked into squash-merge commit messages and wrongly skipped the
238240
# workflows real merges should run (sync itself, release tooling, CI).
239-
if [ "$EVENT" = "push" ] && [ "$HEAD_AUTHOR_EMAIL" = "codeboarding[bot]@users.noreply.github.com" ]; then
240-
skip "Push head commit is CodeBoarding's own baseline commit; not re-analyzing (loop guard)."
241-
fi
241+
case "$HEAD_AUTHOR_EMAIL" in
242+
"codeboarding-review[bot]@users.noreply.github.com"|"codeboarding[bot]@users.noreply.github.com")
243+
if [ "$EVENT" = "push" ]; then
244+
skip "Push head commit is CodeBoarding's own baseline commit; not re-analyzing (loop guard)."
245+
fi
246+
;;
247+
esac
242248
case "$OUTPUT_FORMAT" in
243249
.md) ;;
244250
*) echo "::error::output_format must be .md."; exit 1 ;;
@@ -1593,8 +1599,8 @@ runs:
15931599
exit 0
15941600
fi
15951601
1596-
git config user.name "codeboarding[bot]"
1597-
git config user.email "codeboarding[bot]@users.noreply.github.com"
1602+
git config user.name "codeboarding-review[bot]"
1603+
git config user.email "codeboarding-review[bot]@users.noreply.github.com"
15981604
git commit -m "$COMMIT_MESSAGE" >/dev/null
15991605
16001606
# Push with fetch+rebase retries: another push may land on target_branch

0 commit comments

Comments
 (0)