Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add merge_group build trigger #114

Open
yeikel opened this issue Nov 6, 2024 · 2 comments
Open

Add merge_group build trigger #114

yeikel opened this issue Nov 6, 2024 · 2 comments
Labels
good first issue Good for newcomers recipe

Comments

@yeikel
Copy link
Contributor

yeikel commented Nov 6, 2024

What problem are you trying to solve?

Add the merge_group trigger to a build so that builds are triggered in the merge queue

What precondition(s) should be checked before applying this recipe?

This depends on enablement of merge queue in the branch protection rules but it is out of the scope of this project

Describe the situation before applying the recipe

on:
  pull_request:

Describe the situation after applying the recipe

on:
  pull_request:
  merge_group:

Any additional context

The generic recipe #90 could be used to accomplish this but as that recipe will be more involved, we can deliver this independently first.

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

@yeikel
Copy link
Contributor Author

yeikel commented Nov 6, 2024

@timtebeek What are your thoughts about delivering this before #90?

@timtebeek
Copy link
Contributor

Should be manageable I think; at first glance it's no more than providing a named recipe that applies MergeYaml to add in that merge_group in $.on, very similar to what we've done here:

type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.github.AddManualTrigger
displayName: Add manual workflow trigger
description: You can manually trigger workflow runs. To trigger specific workflows in a repository, use the `workflow_dispatch` event.
tags:
- github
recipeList:
- org.openrewrite.yaml.MergeYaml:
key: $.on
yaml: |-
workflow_dispatch:
acceptTheirs: true
fileMatcher: '.github/workflows/*.yml'

Welcome to push that up! 🙏🏻

@timtebeek timtebeek added good first issue Good for newcomers recipe labels Nov 11, 2024
@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers recipe
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants