Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Merge queue workflows triggered by github-merge-queue[bot] generated permission warnings during preactivation, even though the workflows succeeded. The bot has "none" permission level but should be treated as authorized since merge_group events are only triggered by GitHub's merge queue system.

Changes

  • Added merge_group to safe events list in check_membership.cjs and check_permissions.cjs
  • Permission checks now skip for merge_group events (alongside existing schedule event exemption)
  • Added documentation explaining merge_group safety: requires branch protection, validates combined PR state, not user-initiated

Example

Before:

const safeEvents = ["schedule"];
// merge_group events would fail permission check, generating warnings

After:

const safeEvents = ["schedule", "merge_group"];
// merge_group events skip permission validation

Test Coverage

  • Added test cases for merge_group event handling in both check_membership and check_permissions test suites
Original prompt

This section details on the original issue you should resolve

<issue_title>Preactivation does not work with merge queues</issue_title>
<issue_description>```
Run actions/github-script@ed59741
Checking if user 'github-merge-queue[bot]' has required permissions for devantler-tech/ksail
Required permissions: admin, maintainer, write
Repository permission level: none
User permission 'none' does not meet requirements: admin, maintainer, write


https://github.com/devantler-tech/ksail/actions/runs/21051374407/job/60538214668</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
<comment_new><author>@pelikhan</author><body>
Thanks for reporting this!</body></comment_new>
<comment_new><author>@pelikhan</author><body>
copilot investigate the state of the action job in a work queue.</body></comment_new>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix preactivation not working with merge queues Skip permission checks for merge_group events Jan 16, 2026
Copilot AI requested a review from pelikhan January 16, 2026 01:13
@pelikhan pelikhan marked this pull request as ready for review January 16, 2026 01:14
@pelikhan pelikhan merged commit eca69b0 into main Jan 16, 2026
135 checks passed
@pelikhan pelikhan deleted the copilot/fix-preactivation-merge-queues branch January 16, 2026 02:38
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.

Preactivation does not work with merge queues

2 participants