mirror of https://github.com/golang/go.git
lib/codereview: allow addca CLs without LGTM
LGTM=gri R=golang-codereviews, gri CC=golang-codereviews https://golang.org/cl/61610043
This commit is contained in:
parent
db9fb7b9ab
commit
d0252b17ce
|
|
@ -1935,7 +1935,7 @@ def submit(ui, repo, *pats, **opts):
|
||||||
|
|
||||||
about = ""
|
about = ""
|
||||||
|
|
||||||
if not cl.lgtm and not opts.get('tbr'):
|
if not cl.lgtm and not opts.get('tbr') and not isAddca(cl):
|
||||||
raise hg_util.Abort("this CL has not been LGTM'ed")
|
raise hg_util.Abort("this CL has not been LGTM'ed")
|
||||||
if cl.lgtm:
|
if cl.lgtm:
|
||||||
about += "LGTM=" + JoinComma([CutDomain(who) for (who, line, approval) in cl.lgtm if approval]) + "\n"
|
about += "LGTM=" + JoinComma([CutDomain(who) for (who, line, approval) in cl.lgtm if approval]) + "\n"
|
||||||
|
|
@ -2050,6 +2050,11 @@ def submit(ui, repo, *pats, **opts):
|
||||||
return err
|
return err
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
def isAddca(cl):
|
||||||
|
rev = cl.reviewer
|
||||||
|
isGobot = 'gobot' in rev or 'gobot@swtch.com' in rev or 'gobot@golang.org' in rev
|
||||||
|
return cl.desc.startswith('A+C:') and 'Generated by addca.' in cl.desc and isGobot
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# hg sync
|
# hg sync
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue