diff options
author | 2020-06-25 17:54:14 -0700 | |
---|---|---|
committer | 2020-06-25 17:54:14 -0700 | |
commit | 0496387a16f4409a95c6d2f644ed8d01f6eb43dc (patch) | |
tree | 242383fcfc6670b4ea24b43964f8cedfdab69441 /metrics_pdd_hook.py | |
parent | 39eaf1efe785311fef4e6051290b7568c2f814bf (diff) |
metrics_pdd_hook: allow committer to specify reason if PDD does not need to be updated
e.g. if metrics.proto was merely reformatted,
or only comments were changed.
Bug: 140895523
Test: create test CL that changes metrics.proto
Change-Id: Ia0430d2870097c5d8a4d53c57f853ffb184b41b3
Diffstat (limited to 'metrics_pdd_hook.py')
-rwxr-xr-x | metrics_pdd_hook.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/metrics_pdd_hook.py b/metrics_pdd_hook.py index 093f2cdf2e..fa858553a8 100755 --- a/metrics_pdd_hook.py +++ b/metrics_pdd_hook.py @@ -38,7 +38,7 @@ def is_in_aosp(): def is_commit_msg_valid(commit_msg): for line in commit_msg.splitlines(): line = line.strip().lower() - if line.startswith('updated-pdd') and 'true' in line: + if line.startswith('updated-pdd'): return True return False @@ -65,11 +65,16 @@ def main(): return 0 print('This commit has changed {metrics_file}.'.format(metrics_file=metrics_file)) - print('Please update the Wifi Metrics Privacy Design Doc (PDD) at go/wifi-metrics-pdd') + print('If this change added/changed/removed metrics collected from the device,') + print('please update the Wifi Metrics Privacy Design Doc (PDD) at go/wifi-metrics-pdd') print('and acknowledge you have done so by adding this line to your commit message:') print() print('Updated-PDD: TRUE') print() + print('Otherwise, please explain why the PDD does not need to be updated:') + print() + print('Updated-PDD: Not applicable - reformatted file') + print() print('Please reach out to the OWNERS for more information about the Wifi Metrics PDD.') return 1 |