chore(devcontainer): default git identity to noreply#45
Merged
Conversation
8199090 to
7460e41
Compare
91cee4e to
1978f02
Compare
The base image's global gitconfig defaults to the maintainer's gmail address, so the first push from a fresh devcontainer trips GH007. Set user.email/user.name to the GitHub noreply identity in postCreateCommand so the happy path just works. Co-authored-by: Ona <no-reply@ona.com>
7460e41 to
642f014
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #43. Top of the cli-track stack now (#38 → #39 → #40 → #41 → #42 → #43 → this). The base will retarget to
mainautomatically when #43 merges.Why
The Gitpod base image ships a global gitconfig at
/usr/local/gitpod/shared/gitconfigthat sets the maintainer's gmail address as the default git identity. Discovered the hard way during the recentmain-history rewrite: agit rebaseperformed in this environment recorded the system-default committer address, and the resulting force-push was rejected with GH007.Without intervention, every fresh devcontainer for this repo trips this trap on the first commit/push that doesn't manually override the identity.
What changes
postCreateCommandnow also setsuser.emailanduser.nameto the GitHub-issued noreply identity (120051+leodido@users.noreply.github.com/leodido) right after wiringcore.hooksPath. A fresh devcontainer is correct out of the box.Out of scope