Skip to content

Add auto-merge and reviewer-request support to github/create-pull-request#387

Merged
robinaugh merged 1 commit into
mainfrom
jason/rwx-832-add-auto-merge-and-reviewer-request-support-to-githubcreate
May 14, 2026
Merged

Add auto-merge and reviewer-request support to github/create-pull-request#387
robinaugh merged 1 commit into
mainfrom
jason/rwx-832-add-auto-merge-and-reviewer-request-support-to-githubcreate

Conversation

@robinaugh
Copy link
Copy Markdown
Contributor

@robinaugh robinaugh commented May 13, 2026

Background

RWX-832

rwx/update-packages-github already supported enable-auto-merge, but the lower-level github/create-pull-request package did not — meaning direct consumers couldn't opt into the same streamlined merge flow, and rwx/update-packages-github duplicated the logic in a follow-on task.

Problem

github/create-pull-request had no way to enable auto-merge or request reviewers after creating a PR.

Solution

  • enable-auto-merge (boolean, default false): after create/update, runs gh pr merge "$pr_number" --auto --squash. Failures are logged but don't fail the task.
  • reviewers (string, default ""): comma-separated usernames and/or org/team slugs in gh's native format. After create/update, runs gh pr edit "$pr_number" --add-reviewer. Failures (self-review, missing permission, invalid user) are logged but don't fail the task. If a team slug is present and the teams API returns 403, the warning specifically calls out the missing Members: read org permission.
  • Bumps github/create-pull-request 1.0.6 → 1.0.7.
  • Adds create-pr-auto-merge + assert--auto-merge tests (verifies autoMergeRequest.mergeMethod == SQUASH via gh pr view --json autoMergeRequest).
  • Adds create-pr-reviewers + assert--reviewers tests (verifies robinaugh appears in gh pr view --json reviewRequests).
  • Updates README with both parameters, examples, and the Members: read permission note.
  • Adds octocat to the cspell wordlist.

Updating rwx/update-packages-github to delegate auto-merge to the inner package is tracked in RWX-840 and will follow once 1.0.7 is published.

Further confirmation needed

  • Reviewer test uses robinaugh as the requested reviewer — confirm this is an acceptable test account (it will receive a review request notification on each CI run, though the PR is closed immediately after).
  • Merge method is hard-coded to --squash (not exposed as a parameter), consistent with how rwx/update-packages-github handled it previously. Confirm this is the right call for the lower-level package.

@robinaugh robinaugh self-assigned this May 13, 2026
@robinaugh robinaugh force-pushed the jason/rwx-832-add-auto-merge-and-reviewer-request-support-to-githubcreate branch 4 times, most recently from 380b429 to 339187a Compare May 13, 2026 16:15
@robinaugh robinaugh marked this pull request as ready for review May 13, 2026 16:18
Comment thread github/create-pull-request/README.md Outdated
@robinaugh robinaugh force-pushed the jason/rwx-832-add-auto-merge-and-reviewer-request-support-to-githubcreate branch from 339187a to 25017a2 Compare May 13, 2026 17:29
Comment thread github/create-pull-request/rwx-package.yml Outdated
…uest

- New `enable-auto-merge` boolean param (default false): runs
  `gh pr merge --auto --squash` after the PR is created/updated
- New `reviewers` string param (default ""): runs
  `gh pr edit --add-reviewer` after the PR is created/updated
- Both failures are logged but don't fail the task; if a team reviewer
  fails and the teams API also returns 403, the warning calls out the
  missing Members: read org permission specifically
- Bumps github/create-pull-request 1.0.6 → 1.0.7
- Adds auto-merge and reviewer tests to github/create-pull-request/rwx-test.yml
- Updates README with both params and the Members: read permission note
- Adds octocat to cspell wordlist
@robinaugh robinaugh force-pushed the jason/rwx-832-add-auto-merge-and-reviewer-request-support-to-githubcreate branch from 25017a2 to ad3c3af Compare May 13, 2026 18:39
@robinaugh robinaugh requested review from TAGraves and dan-manges May 13, 2026 18:40
@robinaugh robinaugh merged commit 399794d into main May 14, 2026
1 check passed
@robinaugh robinaugh deleted the jason/rwx-832-add-auto-merge-and-reviewer-request-support-to-githubcreate branch May 14, 2026 14:30
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.

3 participants