signed-commits-required
branch
repo configured to require signed commits (commit.gpgsign=true + signingkey set)
Description
Repo is configured to require GPG-signed commits. The pre-existing commits in the scenario are unsigned (the scenario sets the config *after* seeding history, since CI runners lack a usable GPG key). A tool can read `commit.gpgsign` and `user.signingkey` to detect the "signing required" state and adjust UI / warnings accordingly. Useful for testing: - commit-signing prompts / warnings before commit - "signing required" indicators in commit composers - signing-key inspectors in repo settings views
Contracts
- main is checked out
- main has 3 commits
- commit.gpgsign is true
- user.signingkey is set
- worktree is clean
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('signed-commits-required') npx git-scenarios create signed-commits-required import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('signed-commits-required', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* 3c9536f (HEAD -> main) feat: two
* 1ab1c9c feat: one
* 7520170 chore: initial