Show More
@@ -492,7 +492,7 b' class PullrequestsController(BaseRepoCon' | |||
|
492 | 492 | msg = PullRequestModel.UPDATE_STATUS_MESSAGES[resp.reason] |
|
493 | 493 | warning_reasons = [ |
|
494 | 494 | UpdateFailureReason.NO_CHANGE, |
|
495 |
UpdateFailureReason.WRONG_REF_T |
|
|
495 | UpdateFailureReason.WRONG_REF_TYPE, | |
|
496 | 496 | ] |
|
497 | 497 | category = 'warning' if resp.reason in warning_reasons else 'error' |
|
498 | 498 | h.flash(msg, category=category) |
@@ -130,7 +130,7 b' class UpdateFailureReason(object):' | |||
|
130 | 130 | NO_CHANGE = 2 |
|
131 | 131 | |
|
132 | 132 | # The pull request has a reference type that is not supported for update. |
|
133 |
WRONG_REF_T |
|
|
133 | WRONG_REF_TYPE = 3 | |
|
134 | 134 | |
|
135 | 135 | # Update failed because the target reference is missing. |
|
136 | 136 | MISSING_TARGET_REF = 4 |
@@ -118,9 +118,9 b' class PullRequestModel(BaseModel):' | |||
|
118 | 118 | 'Pull request update failed because of an unknown error.'), |
|
119 | 119 | UpdateFailureReason.NO_CHANGE: lazy_ugettext( |
|
120 | 120 | 'No update needed because the source and target have not changed.'), |
|
121 |
UpdateFailureReason.WRONG_REF_T |
|
|
121 | UpdateFailureReason.WRONG_REF_TYPE: lazy_ugettext( | |
|
122 | 122 | 'Pull request cannot be updated because the reference type is ' |
|
123 | 'not supported for an update.'), | |
|
123 | 'not supported for an update. Only Branch, Tag or Bookmark is allowed.'), | |
|
124 | 124 | UpdateFailureReason.MISSING_TARGET_REF: lazy_ugettext( |
|
125 | 125 | 'This pull request cannot be updated because the target ' |
|
126 | 126 | 'reference is missing.'), |
@@ -594,7 +594,7 b' class PullRequestModel(BaseModel):' | |||
|
594 | 594 | pull_request, source_ref_type) |
|
595 | 595 | return UpdateResponse( |
|
596 | 596 | executed=False, |
|
597 |
reason=UpdateFailureReason.WRONG_REF_T |
|
|
597 | reason=UpdateFailureReason.WRONG_REF_TYPE, | |
|
598 | 598 | old=pull_request, new=None, changes=None, |
|
599 | 599 | source_changed=False, target_changed=False) |
|
600 | 600 |
General Comments 0
You need to be logged in to leave comments.
Login now