Skip to content

Commit

Permalink
fix(action): ignore conflicts by default
Browse files Browse the repository at this point in the history
This restores the previous behaviour of creating conflicting backport by
default. This is what people seems to be using.

It also fixes a limitation: since commands can't have options, it's impossible
to do a backport via the command in comment when there's a conflict.
This makes it possible and up to the user to close the conflicting backport if
needed.
  • Loading branch information
jd authored and mergify[bot] committed Sep 29, 2020
1 parent 94b6ee6 commit bb62afe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/source/actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ parameter:
to.
* - ``ignore_conflicts``
- Boolean
- ``False``
- ``True``
- Whether to create the pull requests even if they are conflicts when
cherry-picking the commits.
* - ``label_conflicts``
Expand Down Expand Up @@ -121,7 +121,7 @@ The ``copy`` action creates a copy of the pull request targetting other branches
- The list of regexes to find branches the pull request should be copied to.
* - ``ignore_conflicts``
- Boolean
- ``False``
- ``True``
- Whether to create the pull requests even if they are conflicts when
cherry-picking the commits.
* - ``label_conflicts``
Expand Down
2 changes: 1 addition & 1 deletion mergify_engine/actions/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CopyAction(actions.Action):
validator = {
voluptuous.Required("branches", default=[]): [str],
voluptuous.Required("regexes", default=[]): [Regex],
voluptuous.Required("ignore_conflicts", default=False): bool,
voluptuous.Required("ignore_conflicts", default=True): bool,
voluptuous.Required("label_conflicts", default="conflicts"): str,
}

Expand Down
2 changes: 1 addition & 1 deletion mergify_engine/tests/unit/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def test_command_loader():
assert action.config == {
"branches": ["branch-3.1", "branch-3.2"],
"regexes": [],
"ignore_conflicts": False,
"ignore_conflicts": True,
"label_conflicts": "conflicts",
}

0 comments on commit bb62afe

Please sign in to comment.