Show More
@@ -520,7 +520,7 b' class PullrequestsController(BaseRepoCon' | |||
|
520 | 520 | def _update_commits(self, pull_request): |
|
521 | 521 | resp = PullRequestModel().update_commits(pull_request) |
|
522 | 522 | |
|
523 |
if resp. |
|
|
523 | if resp.executed: | |
|
524 | 524 | msg = _( |
|
525 | 525 | u'Pull request updated to "{source_commit_id}" with ' |
|
526 | 526 | u'{count_added} added, {count_removed} removed commits.') |
@@ -63,7 +63,7 b' log = logging.getLogger(__name__)' | |||
|
63 | 63 | # Data structure to hold the response data when updating commits during a pull |
|
64 | 64 | # request update. |
|
65 | 65 | UpdateResponse = namedtuple( |
|
66 |
'UpdateResponse', ' |
|
|
66 | 'UpdateResponse', 'executed, reason, new, old, changes') | |
|
67 | 67 | |
|
68 | 68 | |
|
69 | 69 | class PullRequestModel(BaseModel): |
@@ -521,7 +521,7 b' class PullRequestModel(BaseModel):' | |||
|
521 | 521 | "Skipping update of pull request %s due to ref type: %s", |
|
522 | 522 | pull_request, source_ref_type) |
|
523 | 523 | return UpdateResponse( |
|
524 |
|
|
|
524 | executed=False, | |
|
525 | 525 | reason=UpdateFailureReason.WRONG_REF_TPYE, |
|
526 | 526 | old=pull_request, new=None, changes=None) |
|
527 | 527 | |
@@ -530,14 +530,14 b' class PullRequestModel(BaseModel):' | |||
|
530 | 530 | source_commit = source_repo.get_commit(commit_id=source_ref_name) |
|
531 | 531 | except CommitDoesNotExistError: |
|
532 | 532 | return UpdateResponse( |
|
533 |
|
|
|
533 | executed=False, | |
|
534 | 534 | reason=UpdateFailureReason.MISSING_SOURCE_REF, |
|
535 | 535 | old=pull_request, new=None, changes=None) |
|
536 | 536 | |
|
537 | 537 | if source_ref_id == source_commit.raw_id: |
|
538 | 538 | log.debug("Nothing changed in pull request %s", pull_request) |
|
539 | 539 | return UpdateResponse( |
|
540 |
|
|
|
540 | executed=False, | |
|
541 | 541 | reason=UpdateFailureReason.NO_CHANGE, |
|
542 | 542 | old=pull_request, new=None, changes=None) |
|
543 | 543 | |
@@ -557,7 +557,7 b' class PullRequestModel(BaseModel):' | |||
|
557 | 557 | target_commit = target_repo.get_commit(target_ref_id) |
|
558 | 558 | except CommitDoesNotExistError: |
|
559 | 559 | return UpdateResponse( |
|
560 |
|
|
|
560 | executed=False, | |
|
561 | 561 | reason=UpdateFailureReason.MISSING_TARGET_REF, |
|
562 | 562 | old=pull_request, new=None, changes=None) |
|
563 | 563 | |
@@ -630,7 +630,7 b' class PullRequestModel(BaseModel):' | |||
|
630 | 630 | 'update') |
|
631 | 631 | |
|
632 | 632 | return UpdateResponse( |
|
633 |
|
|
|
633 | executed=True, reason=UpdateFailureReason.NONE, | |
|
634 | 634 | old=pull_request, new=pull_request_version, changes=changes) |
|
635 | 635 | |
|
636 | 636 | def _create_version_from_snapshot(self, pull_request): |
General Comments 0
You need to be logged in to leave comments.
Login now