Summary
Add a /lgtm (or /merge) comment command that enables auto-merge on a PR. Once all CI checks pass, the PR merges automatically.
Motivation
After approval, maintainers must manually return to click merge when CI finishes. This adds unnecessary latency.
Proposed Behavior
- Maintainer comments
/lgtm on an approved PR
- Workflow enables GitHub auto-merge via
gh pr merge --auto --squash
- PR merges when all required checks pass; if CI fails, auto-merge is cancelled
Implementation
A GitHub Actions workflow on issue_comment that:
- Verifies the commenter is an org member
- Runs
gh pr merge --auto --squash on the PR
- Supports
/lgtm cancel to disable auto-merge
Summary
Add a
/lgtm(or/merge) comment command that enables auto-merge on a PR. Once all CI checks pass, the PR merges automatically.Motivation
After approval, maintainers must manually return to click merge when CI finishes. This adds unnecessary latency.
Proposed Behavior
/lgtmon an approved PRgh pr merge --auto --squashImplementation
A GitHub Actions workflow on
issue_commentthat:gh pr merge --auto --squashon the PR/lgtm cancelto disable auto-merge