зеркало из https://github.com/mozilla/code-review.git
Improve error message when CRB fails to apply a patch (#1353)
* Improve error message when CRB fails to apply a patch * Nit Co-authored-by: EvaBardou <ebardou@teklia.com>
This commit is contained in:
Родитель
f7ef321ea4
Коммит
263f0a405a
|
@ -230,12 +230,18 @@ class CodeReview(PhabricatorActions):
|
||||||
)
|
)
|
||||||
|
|
||||||
elif mode == "fail:mercurial":
|
elif mode == "fail:mercurial":
|
||||||
|
extra_content = ""
|
||||||
|
if build.missing_base_revision:
|
||||||
|
extra_content = " because the parent revision ({}) does not exist on mozilla-unified. If possible, you should publish that revision".format(
|
||||||
|
build.base_revision
|
||||||
|
)
|
||||||
|
|
||||||
failure = UnitResult(
|
failure = UnitResult(
|
||||||
namespace="code-review",
|
namespace="code-review",
|
||||||
name="mercurial",
|
name="mercurial",
|
||||||
result=UnitResultState.Fail,
|
result=UnitResultState.Fail,
|
||||||
details="WARNING: The code review bot failed to apply your patch.\n\n```{}```".format(
|
details="WARNING: The code review bot failed to apply your patch{}.\n\n```{}```".format(
|
||||||
extras["message"]
|
extra_content, extras["message"]
|
||||||
),
|
),
|
||||||
format="remarkup",
|
format="remarkup",
|
||||||
duration=extras.get("duration", 0),
|
duration=extras.get("duration", 0),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче