Bug 223611 - [webkitscmpy] Base GitHub mock links on provided remote
Summary: [webkitscmpy] Base GitHub mock links on provided remote
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-22 16:16 PDT by Jonathan Bedard
Modified: 2021-03-22 17:47 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.77 KB, patch)
2021-03-22 16:20 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2021-03-22 16:16:40 PDT
Mock links in GitHub responses should be based on the remote provided.
Comment 1 Radar WebKit Bug Importer 2021-03-22 16:16:51 PDT
<rdar://problem/75713760>
Comment 2 Jonathan Bedard 2021-03-22 16:20:44 PDT
Created attachment 423958 [details]
Patch
Comment 3 Aakash Jain 2021-03-22 16:34:15 PDT
Comment on attachment 423958 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423958&action=review

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:211
> +            '            <include-fragment src="/{project}/tree-commit/{ref}" aria-label="Loading latest commit">\n'

now that project contains complete url (starting from github.example.com), should the src still start with /?
Comment 4 Jonathan Bedard 2021-03-22 16:37:21 PDT
Comment on attachment 423958 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423958&action=review

>> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:211
>> +            '            <include-fragment src="/{project}/tree-commit/{ref}" aria-label="Loading latest commit">\n'
> 
> now that project contains complete url (starting from github.example.com), should the src still start with /?

That's why line 229 does "self.remote.split('/')[1:]", we don't want the github.example.com bit, just the team name/repository name
Comment 5 EWS 2021-03-22 17:47:28 PDT
Committed r274830: <https://commits.webkit.org/r274830>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423958 [details].