Skip to content

Feat: Add Merge Group support#292

Open
bramwelt wants to merge 3 commits into
dcoapp:mainfrom
bramwelt:feat/merge-queue-support
Open

Feat: Add Merge Group support#292
bramwelt wants to merge 3 commits into
dcoapp:mainfrom
bramwelt:feat/merge-queue-support

Conversation

@bramwelt

@bramwelt bramwelt commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • Adds a `merge_group.checks_requested` event handler so the DCO check runs when a PR is added to a merge queue
  • Parses the PR number from the merge group's `head_ref` (`refs/heads/gh-readonly-queue//pr--`), fetches the PR, validates its commits for DCO sign-off, and reports the result on the merge group's `head_sha`
  • Adds `merge_group` to `default_events` in `app.yml`
  • Registers `test/fixtures/merge_group.checks_requested.json` in `REUSE.toml` so `reuse lint` passes
  • Fixes `smee-client` dev dependency version (upgraded from `^1.0.1` to `^5.0.0`) to resolve `SmeeClient is not a constructor` error on local development

Post-merge action required

After merging, the Merge group event subscription must be manually enabled in the GitHub App settings:

GitHub → Settings → Developer settings → GitHub Apps → DCO → Permissions & events → Subscribe to events → check "Merge group"

Note: `app.yml` changes do not automatically update existing GitHub App settings — they only apply to new installations created from the manifest.

Test plan

  • All existing tests pass (`npm test`)
  • New `merge_group event` tests pass (3 tests covering failing check, passing check, and unrecognized `head_ref` format)
  • 100% code coverage maintained
  • Enable merge queue on a test repo branch, open a PR, add to merge queue, verify DCO check appears on the merge group SHA

🤖 Generated with Claude Code

bramwelt and others added 2 commits July 13, 2026 17:01
Run the DCO status check when commits are added to a
merge queue. Fetches the original PR using the PR number
parsed from the merge group's head_ref, runs DCO
validation against the PR's commits, and reports the
result on the merge group's head_sha.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
smee-client v1.x used a different export style that caused
'SmeeClient is not a constructor' when Probot (which requires
^5.0.0) tried to use it as a constructor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
@bramwelt bramwelt requested review from a team and Copilot July 14, 2026 00:41
@bramwelt bramwelt changed the title Feat: Add merge_group.checks_requested support Feat: Add Merge Group support Jul 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for GitHub’s merge queue “merge group” checks flow so the DCO app reports its result against the merge-group SHA, ensuring DCO validation runs when a PR enters the merge queue.

Changes:

  • Add a merge_group.checks_requested handler that parses the PR number from merge_group.head_ref, fetches the PR, and reports the DCO check on merge_group.head_sha.
  • Extend the core check() function to optionally report to an override SHA/ref (to support merge groups).
  • Update the GitHub App manifest events and bump the smee-client dev dependency.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
index.js Adds merge group handler and allows check() to report against a specified SHA/ref.
test/index.test.js Adds merge-group tests for passing/failing/ignored head_ref formats.
test/fixtures/merge_group.checks_requested.json Adds a merge_group webhook fixture used by tests.
app.yml Adds merge_group to default_events in the app manifest.
package.json Updates smee-client dev dependency version.
package-lock.json Locks updated dependency graph for smee-client@5.0.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.js
Comment on lines +162 to +165
await check(context, pr, {
reportSha: mergeGroup.head_sha,
reportRef: mergeGroup.head_ref,
});
Comment thread test/index.test.js
Comment on lines +752 to +756
expect(body).toMatchObject({
conclusion: "action_required",
head_branch:
"refs/heads/gh-readonly-queue/master/pr-113-e76ed6025cec8879c75454a6efd6081d46de4c94",
head_sha: "abc123def456abc123def456abc123def456abc1",
Comment thread test/index.test.js
Comment on lines +787 to +791
expect(body).toMatchObject({
conclusion: "success",
head_branch:
"refs/heads/gh-readonly-queue/master/pr-113-e76ed6025cec8879c75454a6efd6081d46de4c94",
head_sha: "abc123def456abc123def456abc123def456abc1",
Comment thread package.json
Comment on lines 25 to +28
"@biomejs/biome": "2.5.2",
"jest": "^30.4.2",
"nock": "^14.0.0",
"smee-client": "^1.0.1"
"smee-client": "5.0.0"
Register test/fixtures/merge_group.checks_requested.json
in REUSE.toml so reuse lint passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Copilot AI review requested due to automatic review settings July 14, 2026 00:49
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

@bramwelt is attempting to deploy a commit to the DCO App Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

"action": "checks_requested",
"merge_group": {
"head_sha": "abc123def456abc123def456abc123def456abc1",
"head_ref": "refs/heads/gh-readonly-queue/master/pr-113-e76ed6025cec8879c75454a6efd6081d46de4c94",
Comment thread test/index.test.js
Comment on lines +754 to +755
head_branch:
"refs/heads/gh-readonly-queue/master/pr-113-e76ed6025cec8879c75454a6efd6081d46de4c94",
Comment thread test/index.test.js
Comment on lines +789 to +790
head_branch:
"refs/heads/gh-readonly-queue/master/pr-113-e76ed6025cec8879c75454a6efd6081d46de4c94",
Comment thread package.json
"jest": "^30.4.2",
"nock": "^14.0.0",
"smee-client": "^1.0.1"
"smee-client": "5.0.0"
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 14, 2026 2:48pm

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