-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add optional, org-wide Gitpod commit annotation #20525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /> | ||
| </ConfigurationSettingsField> | ||
|
|
||
| {isCommitAnnotationEnabled && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, how we indicate what kind of settings should be on General and Policies? (I was trying to find this setting on Policies tab before look through the code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mustard-mh I generally go with my gut here. This time around, I didn't consider this feature a policy, since it's not restricting anything per se, like our other policies we have on that page.
It could definitely be argued that "it's asserting that all of an organization's commits have our Tool: trailer", though, so maybe? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion there, just curious 😋 Any place is good for me (Once the docs to the user is clear, and for sure you will do it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, tested and works! 🎉


Description
For the purposes of insights, org owners might want to answer the question: "what portion of the commits committed to repository A were commited through Gitpod?".
This PR adds an organization setting, which org owners can toggle to annotate Gitpod-based commits with the following:
This is done by registering a
prepare-commit-msghook inside/etc/git/hooks. Because this is all done in user space, repositories or user could opt out by simply removing this/etc/git/hooks/prepare-commit-msgfile via Gitpod tasks or dotfiles, respectively.The organization setting this relies on is hidden behind a
commit_annotation_setting_enabledfeature flag, now enabled just in preview envs.Related Issue(s)
Fixes CLC-1040
How to test
Documentation
Yes, docs are pending.
See issue CLC-1074
Preview status
You can try for yourself at https://ft-org-git4ab8821b53.preview.gitpod-dev.com/workspaces.