Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[git-webkit] Add screen-reader friendly review wizard (Part 1) #27628

Commits on May 23, 2024

  1. [git-webkit] Add screen-reader friendly review wizard (Part 1)

    https://bugs.webkit.org/show_bug.cgi?id=261242
    rdar://115083100
    
    Reviewed by Elliott Williams.
    
    Add a read-only text-based PR review tool to git-webkit.
    
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
    (Git.__init__): Add an "editor" argument which allows a caller to define
    an editor callback which is invoke when the mock commit message editor is
    called during the testing context.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Add Review program.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/review.py: Added.
    (Review.parser): Define arguments for the sub-program.
    (Review.editor): Use a repository object to determine the user's prefered editor, matching
    the editor used to edit commit messages.
    (Review.args_for_url): Extract PR number and repository object from a URL, allowing a
    user to specify a PR URL instead of a number and remote.
    (Review.invoke_wizard): Generate a local file representing a PR, which includes the PR
    diff and comments made against that diff. Open that local file in the user's prefered editor.
    (Review.main): Extract a remote pull-request from the provided arguments and invoke the local
    wizard with the pull-request details.
    * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/review_unittest.py: Added.
    (TestReview):
    (TestReview.editor_callback):
    (TestReview.editor_callback.callback):
    (TestReview.test_bitbucket):
    (TestReview.test_bitbucket_diff):
    (TestReview.test_github):
    (TestReview.test_github_files):
    (TestReview.test_invalid_pr_url):
    (TestReview.test_pr_argument):
    (TestReview.test_editor_no_repo):
    (TestReview.test_editor_repo):
    (TestReview.test_invoke_wizard):
    (TestReview.test_help):
    (TestReview.test_bitbucket_read):
    (TestReview.test_github_read):
    (TestReview.test_bitbucket_read_comments):
    (TestReview.test_github_read_comments):
    
    Canonical link: https://commits.webkit.org/279244@main
    JonWBedard committed May 23, 2024
    Configuration menu
    Copy the full SHA
    26ef083 View commit details
    Browse the repository at this point in the history