Chromium Code Reviews| Index: PRESUBMIT.py |
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
| index 75f930619f9f6aee31b329f92f8a81361487d635..5d64abaee8dc82a6a35bd15066f450c7beda7a16 100644 |
| --- a/PRESUBMIT.py |
| +++ b/PRESUBMIT.py |
| @@ -248,6 +248,8 @@ def PostUploadHook(cl, change, output_api): |
| This hook does the following: |
| * Adds a link to preview docs changes if there are any docs changes in the CL. |
| * Adds 'NOTRY=true' if the CL contains only docs changes. |
| + * Adds 'NOTREECHECKS=true' for non master branch changes since they do not |
| + need to be gated on the master branch's tree. |
| """ |
| results = [] |
| @@ -290,6 +292,19 @@ def PostUploadHook(cl, change, output_api): |
| 'Automatically added a link to preview the docs changes to the ' |
| 'CL\'s description')) |
| + # If the target ref is not master then add NOTREECHECKS=true to the CL's |
| + # description if it does not already exist there. |
| + target_ref = rietveld_obj.get_issue_properties(issue, False).get( |
| + 'target_ref', '') |
| + if target_ref != 'refs/heads/master' and not re.search( |
| + r'^NOTREECHECKS=true$', original_description, re.M | re.I): |
| + new_description += "\nNOTREECHECKS=true" |
|
borenet
2015/02/26 18:41:43
For the moment, should we also add NOTRY=true sinc
|
| + results.append( |
| + output_api.PresubmitNotifyResult( |
| + 'Branch changes do not need to rely on the master branch\'s tree ' |
| + 'status. Automatically added \'NOTREECHECKS=true\' to the CL\'s ' |
| + 'description')) |
| + |
| # If the description has changed update it. |
| if new_description != original_description: |
| rietveld_obj.update_description(issue, new_description) |