Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
shared:
ci_passed: &ci_passed
- check-success~=^test /
- -check-pending~=^test /
- -check-failure~=^test /
- check-success=AI Policy Check

merge_queue:
max_parallel_checks: 1

queue_rules:
- name: default
merge_method: rebase
update_method: rebase
queue_conditions: *ci_passed
merge_conditions: *ci_passed

pull_request_rules:
- name: queue approved pull requests
conditions:
- base~=^(main|master)$
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- label!=do-not-merge
actions:
queue:

- name: queue scala-steward updates
conditions:
- base~=^(main|master)$
Comment thread
mr-git marked this conversation as resolved.
- author=scala-steward
- label!=do-not-merge
actions:
queue:
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,46 @@ jobs:
modules_ignore: 'docs_2.13 docs_3 foo-it-tests_2.13 foo-it-tests_3'
```

## Merge queue (Mergify)

Rebases an approved pull request on the default branch, reruns its CI, then merges it. `scala-steward`
updates are queued without an approval.

### Setup

Install the Mergify app on the project and on this repository, then create `.mergify.yml`:

```yaml
extends: scala-github-actions
```

There is no revision to pin, so this file is live for every project extending it as soon as it lands here.

To replace or switch off a single rule, redefine it by name, the local file wins:

```yaml
extends: scala-github-actions

pull_request_rules:
- name: queue scala-steward updates
disabled:
reason: dependency updates are reviewed by hand here
conditions: []
actions:
queue:
```

### Notes

* `check-success~=^test /` is true as soon as one matching check is green, hence the
`-check-pending~=^test /` and `-check-failure~=^test /` next to it. Bumping Scala versions or renaming
a job needs no change here.
* `AI Policy Check` is required by the org ruleset, so it belongs in the same list.
* there is no attribute for "the default branch", hence `base~=^(main|master)$`. It also keeps stacked
pull requests out of the queue.
* `max_parallel_checks: 1` with identical queue and merge conditions gives in-place checks instead of
temporary draft pull requests.

## Scala Release workflow (v3, v4, v5)

### Setup
Expand Down