Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 373c9a4b07136b26e325a3590e4227228ec23f65
https://github.com/WebKit/WebKit/commit/373c9a4b07136b26e325a3590e4227228ec23f65
Author: Jonathan Bedard <[email protected]>
Date: 2024-04-19 (Fri, 19 Apr 2024)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py
M
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
Log Message:
-----------
[webkitscmpy] Read and write GitHub PR comments
https://bugs.webkit.org/show_bug.cgi?id=266516
rdar://119739688
Reviewed by Elliott Williams.
Provide Python functions to both write and read in-line PR comments.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.request): Mock endpoints to write and read PR comments.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest.review): Add 'diff_comments' argument.
(PullRequest.diff): Added.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.review): Add currently unused 'diff_comments' argument.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator._diff_comments): Return a dictionary of diff comments for
this PR.
(GitHub.PRGenerator._make_comment): Construct a comment on this PR, passing the
specified
kwargs directly to GitHub in the request body.
(GitHub.PRGenerator.review): Allow user to add comments to a specific file in
this PR, or to a specific line in a specific file.
(GitHub.PRGenerator.diff): Return the diff proposed by this pull-request, with
embedded comments if requested.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.PRGenerator.diff): Added.
(Scm.insert_diff_comments): Function which inserts inline diff comments from an
SCM provider into a diff as if they were conflicts.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestNetworkPullRequestGitHub.webserver):
(TestNetworkPullRequestGitHub.test_diff):
(TestNetworkPullRequestGitHub.test_no_comments):
(TestNetworkPullRequestGitHub.test_comment):
(TestNetworkPullRequestGitHub.test_file_comment):
(TestNetworkPullRequestGitHub.test_comment_reply):
Canonical link: https://commits.webkit.org/277752@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes