-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mergify.yml
27 lines (24 loc) · 916 Bytes
/
.mergify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pull_request_rules:
- name: Merge on approval
conditions:
- label=Approved
- base=main
actions:
queue:
name: default
method: squash
commit_message_template: |
{{ title }}
{{ body | get_section("## Description", "") }}
Pull-Request: #{{ number }}.
{# Here comes some fancy Jinja2 stuff for correctly attributing co-authorship: #}
{%- for commit in (commits | unique(False, 'email_author')) | rejectattr("author", "==", author) -%}
{%- if commit.parents|length == 1 -%}
Co-Authored-By: {{ commit.author }} <{{ commit.email_author }}>
{%- endif -%}
{%- endfor -%}
{# GitHub requires that the `Co-authored-by` lines are AT THE VERY END of a commit, hence nothing must come after this. #}
queue_rules:
- name: default
routing_conditions:
- base=main