Summary: | Add label on github when exporting wpt tests to w3c/web-platform-test repo | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brendan McLoughlin <brendan> | ||||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, dean_johnson, ews-watchlist, glenn, jbedard, rniwa, webkit-bug-importer, youennf | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Brendan McLoughlin
2018-03-12 12:45:24 PDT
Created attachment 335627 [details]
Patch
Comment on attachment 335627 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335627&action=review > Tools/Scripts/webkitpy/w3c/common.py:42 > +WEBKIT_EXPORT_PR_LABEL = 'webkit-export' common.py is imported from Chromium. Ideally, we would not want to change this file so that we can easily reimport it from Chromium. We can probably move it to test_export.py. > Tools/Scripts/webkitpy/w3c/test_exporter.py:181 > pr_number = self._github.create_pr(self._wpt_fork_remote + ':' + self._branch_name, self._commit_message, self._commit_message + "\n" + description) Would create_pr always succeed, or are there some cases where it might not be successful, in which case we should add some error handling? Comment on attachment 335627 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335627&action=review >> Tools/Scripts/webkitpy/w3c/test_exporter.py:181 >> pr_number = self._github.create_pr(self._wpt_fork_remote + ':' + self._branch_name, self._commit_message, self._commit_message + "\n" + description) > > Would create_pr always succeed, or are there some cases where it might not be successful, in which case we should add some error handling? When testing this change locally I saw `create_pr` fail when my github token was missing the required permissions and when a pr had already been created for given bug_id. I will add some error handling for these cases. Created attachment 335706 [details]
Patch
Comment on attachment 335706 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335706&action=review > Tools/Scripts/webkitpy/w3c/test_exporter.py:189 > + _log.info('Error creating a pull request on github. Please ensure that the provided github token has the "public_repo" scope.') Might be easier to read if we put this method as a utility routine. Created attachment 335767 [details]
Patch
Comment on attachment 335767 [details] Patch Clearing flags on attachment: 335767 Committed r229600: <https://trac.webkit.org/changeset/229600> All reviewed patches have been landed. Closing bug. |