Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/PRESUBMIT.py

Issue 2512563002: Add WPTEXPORT footer automatically in DepsUpdater and imported/PRESUBMIT (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import re
6
7
8 def PostUploadHook(cl, change, output_api): # pylint: disable=C0103
qyearsley 2016/11/17 00:23:27 For pylint disable pragma, you can use the symboli
9 """git cl upload will call this hook after the issue is created/modified.
foolip 2016/11/17 09:59:14 What about things in LT/imported/csswg-tests and w
jeffcarp 2016/11/17 20:49:58 Yeah it sounds possible to filter those out (in th
10
11 This hook adds WPTEXPORT=true to a CL if it doesn't already exist. This is
foolip 2016/11/17 09:59:14 Whether this is useful depends on what you intend
qyearsley 2016/11/17 17:44:50 I think I'd expect that the default would be for t
jeffcarp 2016/11/17 20:49:58 That sounds like a cleaner way of implementing thi
foolip 2016/11/17 20:52:34 Yeah, that sounds good. I was thinking WPTEXPORT=f
12 to better help the WPT export script identify exportable commits.
qyearsley 2016/11/17 00:23:27 The second sentence could be changed to note what
13 """
14 rietveld_obj = cl.RpcServer()
15 description = rietveld_obj.get_description(cl.issue)
16 if re.search(r'^WPTEXPORT=.+', description, re.M | re.I):
17 return []
18
19 new_description = description
20 new_description += '\nWPTEXPORT=true'
21 rietveld_obj.update_description(cl.issue, new_description)
22
23 return [output_api.PresubmitNotifyResult((
24 'Automatically added WPTEXPORT=true flag due to files being modified '
25 'in LayoutTests/imported and no existing WPTEXPORT flag found.'))]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698