Skip to content

v0.4.1 — target_url and tab completion

Latest

Choose a tag to compare

@jeremy jeremy released this 22 Aug 08:16
02e0cf9

Statuses get a Details link, and tab completion comes back — working this time.

target_url on posted statuses

GitHub renders a Details link on every commit status; without a target_url it goes nowhere. Now:

gh signoff --url "$RUN_URL"                        # this signoff's CI run
gh signoff fail --commit "$SHA" --url "$RUN_URL"   # a runner's red mark, linking its run
git config signoff.url https://ci.example.com/runs # a repo-wide default

--url wins over the config. With neither set, the status carries no target_url at all — a boilerplate link would dead-end people expecting CI results. Only http(s) URLs are accepted, refused before anything is posted. Closes #7. (#25)

Shell completion, on a seam that exists

0.4.0 removed completion because gh doesn't route tab-completion to extensions. The seam that does exist is the gh command's own completion spec, so the command now emits a bash adapter that wraps it — the line 0.4.0 told you to delete is the setup line again:

eval "$(gh signoff completion)"

Put it after gh's own completion line if you have one. gh signoff <Tab> completes commands, options, branches after --branch, and the contexts the branch actually requires; everything else still reaches gh's completion, loaded on demand. Candidate names from the API and from git are data, never shell: inserted escaped, or omitted when the quote context you're typing in has no safe spelling — nothing API-derived is ever shell-evaluated. bash only for now. (#26)

gh signoff contexts

The data source under completion, useful on its own: the exact status-check contexts a branch requires, one full name per line on stdout, human output on stderr. zsh and fish adapters can build on it. contexts is a command word now, like fail — a context literally named contexts is reached with gh signoff create contexts. (#26)

Merging without signoff

To let a GitHub App, team, or role merge without signing off — a merge bot, a release App — add it as a bypass actor on the signoff ruleset in repo settings. gh-signoff preserves bypass_actors across installs and uninstalls, so the grant sticks. Only possible on rulesets — one more reason for the 0.4.0 migration. Now documented in the README. (#10, #25)