Skip to content

feat(config): support draft GitHub pull requests - #786

Draft
farsyed wants to merge 1 commit into
kunchenguid:mainfrom
farsyed:farsyed/draft-pr-support
Draft

feat(config): support draft GitHub pull requests#786
farsyed wants to merge 1 commit into
kunchenguid:mainfrom
farsyed:farsyed/draft-pr-support

Conversation

@farsyed

@farsyed farsyed commented Aug 19, 2026

Copy link
Copy Markdown

This change adds opt-in support for draft GitHub pull requests.

Summary:

  • Adds opt-in draft_pr: true at global and repository configuration scopes.
  • Repository configuration overrides the global configuration.
  • The default is false.
  • New GitHub PRs are created with --draft, including PRs from forks.
  • Existing PR updates and non-GitHub providers are unchanged.

Tests:

  • go test ./internal/config ./internal/scm/github ./internal/pipeline/steps
  • make lint
  • git diff --check

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: I reviewed the diff (config merge, GitHub CreatePR --draft, tests, docs). This is opt-in (draft_pr defaults false; repo overrides global; existing PR updates never change readiness). I approved the first-time fork workflow runs so CI can start.

This PR is still a draft, so it will not be merged from this pass. After it is marked ready and CI is green — including the no-mistakes raise check — it can be reconsidered. Please raise it through the no-mistakes gate if that check fails.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: Re-read the diff (config merge, GitHub CreatePR --draft, tests, docs). Still opt-in: draft_pr defaults false, repo overrides global, updates never change readiness. Hosted tests/e2e/check are green. No additional fork workflow runs were waiting for approval.

This PR is still a draft, and PR must be raised via no-mistakes is still red, so it will not be merged. Please mark it ready when you intend it to ship, and raise it through the no-mistakes gate.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this PR covers issue #761 (opt-in GitHub draft PRs; default false). Not labeling #761 ready-for-pr.

Re-read the diff: draft_pr on global + repo config, repo overrides global, github.Host.WithDraftPR adds --draft only on pr create (including fork heads), updates leave readiness unchanged, GitLab/Azure DevOps untouched. Tests cover merge defaults, create argv, and "no --draft on edit".

Still a draft, and PR must be raised via no-mistakes is still red, so it will not be merged from this pass. Please mark ready when you intend it to ship, raise it through the no-mistakes gate, and consider adding Addresses #761 in the body so the issue is linked. Optional follow-up (not blocking for the standing-rule case): axi run --draft for per-change draft-ness; config already solves the team-wide rule.

VISION: R1/R3/R7 align (opt-in, default false, local config). No captain flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants