-
-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add Signed commits section to CONTRIBUTING #80
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,3 +121,20 @@ We follow [Conventional Commits](https://www.conventionalcommits.org/): | |
| [optional body] | ||
|
|
||
| [optional footer] | ||
|
|
||
| ## Signed commits | ||
|
|
||
| Every commit that reaches the default branch must be signed; a ruleset refuses | ||
| unsigned pushes. Estate policy: | ||
| [SIGNING-POLICY](https://github.com/hyperpolymath/standards/blob/main/docs/SIGNING-POLICY.adoc). | ||
|
|
||
| - **People and interactive agents** sign with an SSH key registered on GitHub | ||
| as a *signing* key (`gpg.format=ssh`, `user.signingkey=<key>.pub`, | ||
| `commit.gpgsign=true`). The committer email must be verified on that account. | ||
| - **Apps, bots and workflows** never `git push` local commits. They write | ||
| through the API (`createCommitOnBranch` or the estate `signed-push` action) | ||
| so that GitHub signs each commit. | ||
| - Merge PRs with **squash**. The ruleset checks every commit on the PR branch, | ||
| not just the result, so one unsigned commit blocks the merge. Re-create such a | ||
| branch with signed commits (`git cherry-pick -S`) and open a new PR. | ||
| Rebase-merge replays commits unsigned and is disabled. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: git show 5cd7b8b5ca4576be7416580f0922900eb71a29aa:.github/settings.yml | sed -n '1,12p;48,60p'
git show 5cd7b8b5ca4576be7416580f0922900eb71a29aa:.github/CONTRIBUTING.md | sed -n '120,144p'
git show 5cd7b8b5ca4576be7416580f0922900eb71a29aa:CONTRIBUTING.adoc | sed -n '72,96p'
rg -n 'Require-Signed-Commits|Require signed|allow_rebase_merge|rebase-merge' .github docsRepository: hyperpolymath/system-et Length of output: 3148 🏁 Script executed: #!/bin/bash
set -u
echo '--- checked-in configuration and guides ---'
git show 5cd7b8b5ca4576be7416580f0922900eb71a29aa:.github/settings.yml | sed -n '48,60p'
git show 5cd7b8b5ca4576be7416580f0922900eb71a29aa:.github/CONTRIBUTING.md | sed -n '132,143p'
git show 5cd7b8b5ca4576be7416580f0922900eb71a29aa:CONTRIBUTING.adoc | sed -n '84,95p'
echo '--- repository merge controls ---'
gh api repos/hyperpolymath/system-et --jq '{allow_squash_merge,allow_merge_commit,allow_rebase_merge,default_branch,web_commit_signoff_required}'
echo '--- repository rulesets ---'
gh api repos/hyperpolymath/system-et/rulesets --paginate --jq '.[] | {id,name,target,enforcement,conditions,rules}'
echo '--- main branch protection ---'
gh api repos/hyperpolymath/system-et/branches/main/protection --jq '{required_status_checks,required_pull_request_reviews,enforce_admins,restrictions,required_signatures}' 2>&1
echo '--- open pull request metadata ---'
gh api repos/hyperpolymath/system-et/pulls?state=open --paginate --jq '.[] | {number,head:.head.ref,head_repo:.head.repo.full_name,base:.base.ref,mergeable_state, rebaseable, merge_commit_sha}' 2>&1Repository: hyperpolymath/system-et Length of output: 2794 🌐 Web query:
💡 Result: 🏁 Script executed: set -u
printf '%s\n' '--- live merge controls ---'
gh api repos/hyperpolymath/system-et --jq '{allow_squash_merge,allow_merge_commit,allow_rebase_merge,default_branch,web_commit_signoff_required}' 2>&1
printf '%s\n' '--- live rulesets ---'
gh api repos/hyperpolymath/system-et/rulesets --paginate --jq '.[] | {id,name,target,enforcement,conditions,rules}' 2>&1
printf '%s\n' '--- live main protection ---'
gh api repos/hyperpolymath/system-et/branches/main/protection --jq '{required_status_checks,required_pull_request_reviews,enforce_admins,restrictions,required_signatures}' 2>&1Repository: hyperpolymath/system-et Length of output: 944 🌐 Web query:
💡 Result: Disable rebase-merge in the repository settings.
Suggested fix- allow_rebase_merge: true
+ allow_rebase_merge: false🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,3 +73,20 @@ protection requires review and passing checks. | |
| packaging policy, secrets, licence consistency and workflow security. | ||
| . Security issues: follow `+SECURITY.md+` — report privately, never in a | ||
| public issue. | ||
|
|
||
| == Signed commits | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Keep this heading inside the existing section.
🤖 Prompt for AI Agents |
||
|
|
||
| Every commit that reaches the default branch must be signed; a ruleset refuses | ||
| unsigned pushes. Estate policy: | ||
| https://github.com/hyperpolymath/standards/blob/main/docs/SIGNING-POLICY.adoc[SIGNING-POLICY]. | ||
|
|
||
| * **People and interactive agents** sign with an SSH key registered on GitHub | ||
| as a *signing* key (`gpg.format=ssh`, `user.signingkey=<key>.pub`, | ||
| `commit.gpgsign=true`). The committer email must be verified on that account. | ||
| * **Apps, bots and workflows** never `git push` local commits. They write | ||
| through the API (`createCommitOnBranch` or the estate `signed-push` action) | ||
| so that GitHub signs each commit. | ||
| * Merge PRs with **squash**. The ruleset checks every commit on the PR branch, | ||
| not just the result, so one unsigned commit blocks the merge. Re-create such a | ||
| branch with signed commits (`git cherry-pick -S`) and open a new PR. | ||
| Rebase-merge replays commits unsigned and is disabled. | ||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/system-et
Length of output: 4936
🌐 Web query:
official Git documentation gpg.format ssh user.signingkey public key ssh-agent private key path💡 Result:
Document the SSH signing-key prerequisite.
Both guides use a public key path for
user.signingkey, but Git requires the matching private key to be available throughssh-agent. A contributor without that access can fail to create signed commits. Git also supports settinguser.signingkeyto the private-key path.Add this prerequisite and alternative to both guides:
Suggested documentation update
- as a *signing* key (`gpg.format=ssh`, `user.signingkey=<key>.pub`, `commit.gpgsign=true`). The committer email must be verified on that account. + When `user.signingkey` points to a public key, the matching private key must + be available through `ssh-agent`. Alternatively, set `user.signingkey` to the + matching private-key path.🤖 Prompt for AI Agents