Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Enable jobs on merge queues #148

Merged
merged 1 commit into from
Apr 5, 2023
Merged

Conversation

skitt
Copy link
Member

@skitt skitt commented Apr 5, 2023

See
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue
for details.

The target_devel and apply-suggestions-commits jobs are required, so
they need to run on merge group events, but their results are only
valid outside the merge queue, so they are ignored if the event isn't
a pull_request event.

The DCO app is required by the CNCF, but doesn't support merge queues
yet. Until it does, this restores the old DCO check for PRs, ignoring
it in merge queues; that way, we can require that, ensuring that PR
commits have a DCO, without blocking the merge queue.

(The general reasoning is that PR checks should verify everything
related to the commits themselves; merge queue checks should verify
everything that changes as a result of the position of the PR in the
queue, which doesn't include commit texts, so anything related to that
can be ignored in the merge queue if it's been checked in the PR.
GitHub doesn't support different requirements for PRs and merge queues
yet, so this needs to be handled by skipping irrelevant tests in merge
queues in the workflow configuration itself.)

@submariner-bot
Copy link

🤖 Created branch: z_pr148/skitt/merge-groups

@skitt skitt enabled auto-merge April 5, 2023 10:30
@github-advanced-security
Copy link

You have successfully added a new Grype configuration .github/workflows/linting.yml:vulnerability-scan. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@skitt skitt added this pull request to the merge queue Apr 5, 2023
@dfarrell07
Copy link
Member

tim-actions/get-pr-commits doesn't seem to support the merge_group event.

@skitt skitt removed this pull request from the merge queue due to a manual request Apr 5, 2023
@skitt skitt enabled auto-merge April 5, 2023 13:35
@skitt skitt added this pull request to the merge queue Apr 5, 2023
@skitt
Copy link
Member Author

skitt commented Apr 5, 2023

DCO also doesn’t support merge queues: dcoapp/app#199

@dfarrell07
Copy link
Member

The relevant get-pr-commits code is: https://github.com/tim-actions/get-pr-commits/blob/master/index.js#L4

I'll send a PR to add the merge_group event.

@dfarrell07
Copy link
Member

The relevant get-pr-commits code is: https://github.com/tim-actions/get-pr-commits/blob/master/index.js#L4

I'll send a PR to add the merge_group event.

tim-actions/get-pr-commits#14

@skitt
Copy link
Member Author

skitt commented Apr 5, 2023

The relevant get-pr-commits code is: https://github.com/tim-actions/get-pr-commits/blob/master/index.js#L4

I'll send a PR to add the merge_group event.

Thanks! It’s not all that useful for our specific scenario, but I imagine other users will need this. (For us, since the PR’s commits are checked before the PR is added to the merge queue, and the merge queue won’t change the PR’s commit titles etc., we don’t need to re-check them in the merge queue.)

See
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue
for details.

The target_devel and apply-suggestions-commits jobs are required, so
they need to run on merge group events, but their results are only
valid outside the merge queue, so they are ignored if the event isn't
a pull_request event.

The DCO app is required by the CNCF, but doesn't support merge queues
yet. Until it does, this restores the old DCO check for PRs, ignoring
it in merge queues; that way, we can require that, ensuring that PR
commits have a DCO, without blocking the merge queue.

(The general reasoning is that PR checks should verify everything
related to the commits themselves; merge queue checks should verify
everything that changes as a result of the position of the PR in the
queue, which doesn't include commit texts, so anything related to that
can be ignored in the merge queue if it's been checked in the PR.
GitHub doesn't support different requirements for PRs and merge queues
yet, so this needs to be handled by skipping irrelevant tests in merge
queues in the workflow configuration itself.)

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@skitt skitt removed this pull request from the merge queue due to a manual request Apr 5, 2023
@skitt skitt enabled auto-merge April 5, 2023 15:06
@skitt skitt disabled auto-merge April 5, 2023 15:07
@skitt skitt enabled auto-merge April 5, 2023 15:07
@skitt
Copy link
Member Author

skitt commented Apr 5, 2023

The relevant GitHub discussion for MQ v. PR requirements is https://github.com/orgs/community/discussions/46757#discussioncomment-4908640.

@skitt skitt added this pull request to the merge queue Apr 5, 2023
Merged via the queue into submariner-io:devel with commit 951ceff Apr 5, 2023
@submariner-bot
Copy link

🤖 Closed branches: [z_pr148/skitt/merge-groups]

@skitt skitt deleted the merge-groups branch April 6, 2023 08:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants