mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[CHG] runbot_merge: don't reset cancel_staging on r-
Also send skipchecks removal to the PR being r-'d, as sending it to a random PR of the batch doesn't really make sense?
This commit is contained in:
parent
c66451a8c7
commit
fa2bba3cb9
@ -700,8 +700,6 @@ class PullRequests(models.Model):
|
|||||||
else:
|
else:
|
||||||
msg = self._approve(author, login)
|
msg = self._approve(author, login)
|
||||||
case commands.Reject() if is_author:
|
case commands.Reject() if is_author:
|
||||||
if self.batch_id.cancel_staging:
|
|
||||||
self.batch_id.cancel_staging = False
|
|
||||||
if self.batch_id.skipchecks or self.reviewed_by:
|
if self.batch_id.skipchecks or self.reviewed_by:
|
||||||
if self.error:
|
if self.error:
|
||||||
self.error = False
|
self.error = False
|
||||||
@ -712,7 +710,7 @@ class PullRequests(models.Model):
|
|||||||
self.env.ref("runbot_merge.command.unapprove.p0")._send(
|
self.env.ref("runbot_merge.command.unapprove.p0")._send(
|
||||||
repository=self.repository,
|
repository=self.repository,
|
||||||
pull_request=self.number,
|
pull_request=self.number,
|
||||||
format_args={'user': login, 'pr': self.batch_id.prs[:1]},
|
format_args={'user': login, 'pr': self},
|
||||||
)
|
)
|
||||||
self.unstage("unreviewed (r-) by %s", login)
|
self.unstage("unreviewed (r-) by %s", login)
|
||||||
else:
|
else:
|
||||||
|
@ -2880,17 +2880,10 @@ class TestBatching(object):
|
|||||||
assert p_01.state == 'opened'
|
assert p_01.state == 'opened'
|
||||||
assert p_01.priority == 'alone'
|
assert p_01.priority == 'alone'
|
||||||
assert p_01.skipchecks == False
|
assert p_01.skipchecks == False
|
||||||
assert p_01.cancel_staging == False
|
assert p_01.cancel_staging == True
|
||||||
|
|
||||||
p_01.batch_id.cancel_staging = True
|
assert staging_4.active, "staging should not be disabled"
|
||||||
# FIXME: cancel_staging should only cancel when the PR is or
|
|
||||||
# transitions to ready
|
|
||||||
# assert staging_4.active
|
|
||||||
# re-staging, should not be necessary
|
|
||||||
env.run_crons()
|
|
||||||
|
|
||||||
staging_5 = ensure_one(sm_all.staging_id)
|
|
||||||
assert staging_5.active
|
|
||||||
# cause the PR to become ready the normal way
|
# cause the PR to become ready the normal way
|
||||||
with repo:
|
with repo:
|
||||||
pr01.post_comment("hansen r+", config['role_reviewer']['token'])
|
pr01.post_comment("hansen r+", config['role_reviewer']['token'])
|
||||||
|
Loading…
Reference in New Issue
Block a user