WebKit Bugzilla
Attachment 346118 Details for
Bug 188185
: test wkbi with webkit-patch upload
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188185-20180730161207.patch (text/plain), 6.99 KB, created by
Lucas Forschler
on 2018-07-30 16:12:08 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Lucas Forschler
Created:
2018-07-30 16:12:08 PDT
Size:
6.99 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 234394) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2018-07-30 Lucas Forschler <lforschler@apple.com> >+ >+ test wkbi with webkit-patch upload >+ https://bugs.webkit.org/show_bug.cgi?id=188185 >+ <rdar://problem/1234567> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkit-patch: >+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: >+ (Bugzilla.add_keyword_to_bug): >+ * Scripts/webkitpy/tool/commands/upload.py: >+ (Upload): >+ * Scripts/webkitpy/tool/steps/__init__.py: >+ * Scripts/webkitpy/tool/steps/addwkbi.py: Added. >+ (AddWKBI): >+ (AddWKBI.options): >+ (AddWKBI.GetRadarLinkFromDiff): >+ (AddWKBI.run): >+ > 2018-07-27 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, fix typo in test expectations and mark another test as timing out >Index: Tools/Scripts/webkit-patch >=================================================================== >--- Tools/Scripts/webkit-patch (revision 234392) >+++ Tools/Scripts/webkit-patch (working copy) >@@ -1,7 +1,8 @@ > #!/usr/bin/env python >+ > # Copyright (c) 2011 Code Aurora Forum. All rights reserved. > # Copyright (c) 2010 Google Inc. All rights reserved. >-# Copyright (c) 2009 Apple Inc. All rights reserved. >+# Copyright (c) 2018 Apple Inc. All rights reserved. > # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) > # > # Redistribution and use in source and binary forms, with or without >Index: Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py >=================================================================== >--- Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py (revision 234392) >+++ Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py (working copy) >@@ -851,6 +851,15 @@ class Bugzilla(object): > self.browser["newcc"] = ", ".join(email_address_list) > self.browser.submit() > >+ def add_keyword_to_bug(self, bug_id, keyword): >+ self.authenticate() >+ >+ _log.info("Adding %s to the keyword list for bug %s" % (keyword, bug_id)) >+ self.open_url(self.bug_url_for_bug_id(bug_id)) >+ self.browser.select_form(name="changeform") >+ self.browser["keywords"] = keyword >+ self.browser.submit() >+ > def post_comment_to_bug(self, bug_id, comment_text, cc=None): > self.authenticate() > >Index: Tools/Scripts/webkitpy/tool/commands/upload.py >=================================================================== >--- Tools/Scripts/webkitpy/tool/commands/upload.py (revision 234392) >+++ Tools/Scripts/webkitpy/tool/commands/upload.py (working copy) >@@ -285,6 +285,7 @@ class Upload(AbstractPatchUploadingComma > steps.SuggestReviewers, > steps.EnsureBugIsOpenAndAssigned, > steps.PostDiff, >+ steps.AddWKBI, > steps.SubmitToEWS, > steps.WPTChangeExport, > ] >Index: Tools/Scripts/webkitpy/tool/steps/__init__.py >=================================================================== >--- Tools/Scripts/webkitpy/tool/steps/__init__.py (revision 234392) >+++ Tools/Scripts/webkitpy/tool/steps/__init__.py (working copy) >@@ -29,6 +29,7 @@ > > # FIXME: Is this the right way to do this? > from webkitpy.tool.steps.addsvnmimetypeforpng import AddSvnMimetypeForPng >+from webkitpy.tool.steps.addwkbi import AddWKBI > from webkitpy.tool.steps.applypatch import ApplyPatch > from webkitpy.tool.steps.applypatchwithlocalcommit import ApplyPatchWithLocalCommit > from webkitpy.tool.steps.applywatchlist import ApplyWatchList >Index: Tools/Scripts/webkitpy/tool/steps/addwkbi.py >=================================================================== >--- Tools/Scripts/webkitpy/tool/steps/addwkbi.py (nonexistent) >+++ Tools/Scripts/webkitpy/tool/steps/addwkbi.py (working copy) >@@ -0,0 +1,76 @@ >+# Copyright (C) 2018 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions are >+# met: >+# >+# * Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# * Redistributions in binary form must reproduce the above >+# copyright notice, this list of conditions and the following disclaimer >+# in the documentation and/or other materials provided with the >+# distribution. >+# * Neither the name of Google Inc. nor the names of its >+# contributors may be used to endorse or promote products derived from >+# this software without specific prior written permission. >+# >+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+from webkitpy.tool.steps.abstractstep import AbstractStep >+from webkitpy.tool.steps.options import Options >+import re >+ >+ >+class AddWKBI(AbstractStep): >+ @classmethod >+ def options(cls): >+ return AbstractStep.options() + [ >+ Options.description, >+ Options.comment, >+ Options.review, >+ Options.request_commit, >+ Options.open_bug, >+ Options.ews, >+ ] >+ >+ def GetRadarLinkFromDiff(self, diff): >+ matcher = re.compile(r'(<?rdar:\/\/problems?\/)?(?P<radar_id>-?\d{7,})>?') >+ match = matcher.search(diff) >+ >+ if not match: >+ return None >+ >+ id = int(match.group('radar_id')) >+ if id < 0: >+ return None >+ >+ link = '<rdar://problem/{}>'.format(id) >+ return link >+ >+ def run(self, state): >+ diff = self.cached_lookup(state, "diff") >+ bug_id = state["bug_id"] >+ keyword = "InRadar" >+ wkbi_email = "webkit-bug-importer@group.apple.com" >+ >+ # check for radar link / regex >+ comment = self.GetRadarLinkFromDiff(diff) >+ >+ print("addwkbi.py: comment is: {}".format(comment)) >+ if comment: >+ # add "InRadar" keyword >+ self._tool.bugs.add_keyword_to_bug(bug_id, keyword) >+ # add radar link as comment >+ self._tool.bugs.post_comment_to_bug(bug_id, comment) >+ # cc webkit-bug-importer >+ self._tool.bugs.add_cc_to_bug(state['bug_id'], wkbi_email) > >Property changes on: Tools/Scripts/webkitpy/tool/steps/addwkbi.py >___________________________________________________________________ >Added: svn:executable >## -0,0 +1 ## >+* >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dbates
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188185
: 346118