Add merge_queue setting to repos
- Dominant language
- No language data
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
## Changes Required
### Configuration Changes
Under any `.github/workflows/` files that contain checks that are required to be retested after addition to the merge queue add the following. Note - if you are not sure which ones, check any that are triggered `on.push_request_target: main`
Add the following to `on`
```
merge_group:
types: [checks_requested]
workflow_dispatch:
```
If you are using `path_ignores` or `path` to skip jobs based on specified directories or files
Under jobs add the following pre-job to the top of the list of jobs
```
pre-job:
runs-on: ubuntu-latest
name: Pre job checks
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- uses: actions/checkout@v4
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.1
with:
cancel_others: false
paths_ignore: '[]'
OR
paths: '[]'
```
Remove the entry for `paths_ignores` OR `path`, it is now handled by the pre-job
For each job add the following entry:
```
if: needs.pre-job.outputs.should_skip != 'true'
needs: pre-job
```
For all workflow files regardless of the use of `path_ignore` and that contain jobs that need to be retested on addition to the merge queue, to the bottom of the job list add the following:
```
required-checks:
name: Required Checks
# This check adds a list of checks to one job to simplify adding settings to the repo.
# If a new check is added in this file, and it should be retested on entry to the merge queue,
# it needs to be added to the list below aka needs: [ existing check 1, existing check 2, new check ].
needs: [ ]
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo '${{ toJSON(needs) }}' | jq -e 'all(.[]; .result == "success" or .result == "skipped")'
```
### Setting Changes
After your pr is merged add the following settings.
Your Repo -> `Settings`-> `Branches` -> `main` -> `edit` -> `Require status checks to pass before merging` -> `true`
-> `Status Checks that are required` -> Add using the `required-checks.name` for any that you have added to your workflow files.
It will look something like the following. Pro Tip: search for `Required Checks` and all your applicable checks should appear in the dropdown

Your Repo -> `Settings`-> `Branches` -> `main` -> `edit` -> `Require merge queue`

## Repo Checklist
- [x] Kuadrant/dns-operator https://github.com/Kuadrant/dns-operator/pull/350 https://github.com/Kuadrant/dns-operator/pull/354 https://github.com/Kuadrant/dns-operator/pull/355
- [x] Kuadrant/kuadrantctl [Eguzki] https://github.com/Kuadrant/kuadrantctl/pull/114
- [x] Kuadrant/kuadrant-operator https://github.com/Kuadrant/kuadrant-operator/pull/1138
- [x] Kuadrant/docs.kuadrant.io [@jasonmadigan] https://github.com/Kuadrant/docs.kuadrant.io/issues/190
- [ ] Kuadrant/authorino-examples
- [ ] Kuadrant/testsuite-pipelines
- [x] Kuadrant/limitador [@adam-cattermole] https://github.com/Kuadrant/limitador/pull/413
- [x] Kuadrant/authorino [@KevFan] https://github.com/Kuadrant/authorino/pull/524
- [ ] Kuadrant/testsuite
- [ ] Kuadrant/architecture
- [x] Kuadrant/wasm-shim [@adam-cattermole] https://github.com/Kuadrant/wasm-shim/pull/162
- [x] Kuadrant/limitador-operator [@adam-cattermole] https://github.com/Kuadrant/limitador-operator/pull/177
- [ ] Kuadrant/helm-charts
- [x] Kuadrant/kuadrant-console-plugin [@jasonmadigan] https://github.com/Kuadrant/kuadrant-console-plugin/issues/197
- [x] Kuadrant/kuadrant.github.io [@jasonmadigan] https://github.com/Kuadrant/kuadrant.github.io/issues/74
- [ ] Kuadrant/kuadra
- [ ] Kuadrant/deployment
- [ ] Kuadrant/react-policy-topology
- [x] Kuadrant/gateway-api-state-metrics
- [ ] Kuadrant/.github
- [ ] Kuadrant/wasm-test-framework
- [ ] Kuadrant/authorino-operator [@KevFan] https://github.com/Kuadrant/authorino-operator/pull/250
- [ ] Kuadrant/policy-machinery
- [ ] Kuadrant/governance
- [ ] Kuadrant/gateway-api-metrics-exporter
- [ ] Kuadrant/console-quickstart
- [ ] Kuadrant/installation
- [ ] Kuadrant/api-quickstart
- [ ] Kuadrant/blank-petstore
- [ ] Kuadrant/external-dns
Contributor guide
Assessment
This issue has not been assessed yet.