Documentation
¶
Overview ¶
Package githubpr implements the "github-pr" built-in hook. On ticket.completed it opens a pull request via the gh CLI, using the ticket name as the PR title, BASE_REF as the target branch, and a body constructed from PHASE_NAMES. When entry.Draft is true the PR is created as a draft.
A pre-flight check verifies that gh is on PATH; if it is absent the hook returns a descriptive error that Registry.Fire logs as a warning, and the lifecycle event continues unaffected.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArgs ¶
BuildArgs assembles the argument slice for `gh pr create`.
func BuildBody ¶
BuildBody constructs the pull-request body from the event environment variables. PLAN_SLUG provides plan context and PHASE_NAMES (newline- separated) is rendered as a markdown bullet list.
func DefaultRunner ¶
DefaultRunner is the production Runner that execs the command with cmd.Dir set to workDir so that gh can discover the repo's GitHub remote. On failure the combined stdout+stderr output is captured (truncated via hooksreg.TruncateOutput) and included in the returned error so the actual gh error message is visible instead of a bare "exit status 1".
Types ¶
Source Files
¶
- githubpr.go