Skip to content

feat(gh-nudge): skip draft PRs when nudging#181

Merged
jaeyeom merged 1 commit into
mainfrom
gh-nudge-skip-draft-prs
Jun 10, 2026
Merged

feat(gh-nudge): skip draft PRs when nudging#181
jaeyeom merged 1 commit into
mainfrom
gh-nudge-skip-draft-prs

Conversation

@jaeyeom

@jaeyeom jaeyeom commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

gh-nudge previously nudged reviewers on all open PRs authored by the user, including drafts. Draft PRs aren't ready for review, so those nudges are noise.

This change fetches the isDraft field from the gh CLI and filters drafts out of GetPendingPullRequests(), so neither the nudge path nor the auto-merge path (which builds on it) acts on draft PRs.

Changes

  • internal/models/pr.go — added IsDraft bool field to PullRequest.
  • internal/github/github.go — added isDraft to the gh pr list --json query and filtered out drafts in GetPendingPullRequests(). PRs missing the field default to non-draft (backward-safe).
  • internal/github/github_test.go — added tests covering draft skipping and the missing-field default.

Testing

make check passes via the pre-commit hook: 292 + 4 Bazel tests pass, 0 golangci-lint / semgrep findings.

Draft PRs are not yet ready for review, so nudging their reviewers is
noise. Fetch the isDraft field from the gh CLI and filter drafts out of
GetPendingPullRequests so neither the nudge nor the auto-merge path acts
on them.
@jaeyeom jaeyeom merged commit cb12efa into main Jun 10, 2026
7 of 8 checks passed
@jaeyeom jaeyeom deleted the gh-nudge-skip-draft-prs branch June 10, 2026 23:56
@jaeyeom jaeyeom self-assigned this Jun 10, 2026
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.

1 participant