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

mergify: Add merge automation #70

Closed
wants to merge 1 commit into from
Closed
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
75 changes: 75 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,80 @@
pull_request_rules:

- name: auto-merge
description: automatic merge for main with >= 2 approved reviews, all requested reviews have given feedback, not held, and CI is successful
conditions:
- "#approved-reviews-by>=2"
- "#review-requested=0"
- "#changes-requested-reviews-by=0"
- or:
- base=main
- base~=release-.*
- label!=hold
- label!=do-not-merge
- label!=needs-rebase
- check-success=DCO

# If files are changed in .github/, the actionlint check must pass
- or:
- and:
# regex should match the one in .github/workflows/actionlint.yml
- files~=.github/workflows/.*\.ya?ml$
- check-success=actionlint
- -files~=.github/workflows/.*\.ya?ml$

# e2e workflow
- or:
- and:
- check-success=e2e
- or:
- files~='.*\.py$'
- files~=pyproject.toml$
- files~=requirements.*\.txt$
- files~=.github/workflows/e2e.yml$
- and:
- -files~='.*\.py$'
- -files~=pyproject.toml$
- -files~=requirements.*\.txt$
- -files~=.github/workflows/e2e.yml$

# lint and test must pass if files change that would trigger this job
- or:
- and:
- check-success=lint
- check-success=test-workflow-complete
- or:
# see .github/workflows/lint.yml and test.yml
- files~=.*\.py$
- files~=pyproject.toml$
- files~=requirements.*\.txt$
- files~=tox.ini$
- files~=scripts/[^/]+\.sh$
- files~=.github/.*$
- and:
- -files~=.*\.py$
- -files~=pyproject.toml$
- -files~=requirements.*\.txt$
- -files~=tox.ini$
- -files~=scripts/[^/]+\.sh$
- -files~=.github/.*$

- or:
- and:
- or:
- files~='.*\.md'
- files='.markdownlint-cli2.yaml'
- files='.github/workflows/docs.yml'
- check-success=markdown-lint
- and:
- -files~='.*\.md'
- -files='.markdownlint-cli2.yaml'
- -files='.github/workflows/docs.yml'

actions:
merge:
method: merge
delete_head_branch:

- name: label-cicd
description: Automatically apply CI/CD label
conditions:
Expand Down