Skip to content

Commit

Permalink
Merge pull request #2341 from nilxam/supersede_fix_2
Browse files Browse the repository at this point in the history
stagingapi: Supersedes request is from the same project
  • Loading branch information
coolo committed Nov 26, 2019
2 parents 9223dbe + ab97823 commit 094b5d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osclib/stagingapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,11 @@ def superseded_request(self, request, target_requests=None):
self.do_change_review_state(request_id, 'declined',
by_group=self.cstaging_group, message=message)
else:
# Supersedes request is from the same project
if request_new.find('./action/source').get('project') == request_old.find('./action/source').get('project'):
message = 'sr#{} has newer source and is from the same project'.format(request_new.get('id'))
self.set_review(int(stage_info['rq_id']), stage_info['prj'], state='declined', msg=message)
return stage_info, None
# Ingore the new request pending manual review.
IgnoreCommand(self).perform([str(request_id)], message)

Expand Down

0 comments on commit 094b5d1

Please sign in to comment.