Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ef92b431a492aa839a089bbb1bffff6cf7b3337f
      
https://github.com/WebKit/WebKit/commit/ef92b431a492aa839a089bbb1bffff6cf7b3337f
  Author: Ryan Haddad <[email protected]>
  Date:   2026-07-21 (Tue, 21 Jul 2026)

  Changed paths:
    M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
    M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py

  Log Message:
  -----------
  Don't tell users their API token is out of date on non-auth GitHub errors
https://bugs.webkit.org/show_bug.cgi?id=319642
rdar://problem/182462879

Reviewed by Aakash Jain.

The GitHub remote and tracker printed the "Is your API token out of date?" 
refresh prompt
after any non-2xx response that carried authentication, such as a transient 5xx 
server error,
a 404 for a missing/non-existent request, or a 403/429 rate-limit response.

Create a new class that provides uses with a more accurate hint, surfacing 
rate-limiting,
transient server errors, or authentication issues depending on the response 
code.

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker): Add SERVER_ERROR_PROMPT, RATE_LIMIT_PROMPT and the api_error_hint() 
classmethod.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py:
(TestGitHub.test_api_error_hint): Add new test.
(TestGitHub.test_api_error_hint.resp):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
Route create/update/_make_comment/review/request/graphql through 
api_error_hint(), drop the
now-redundant 422 guards.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py:
(TestCheckout.test_no_pr_github): A 404 for a missing PR no longer asserts the 
refresh prompt,
so update the test.

Canonical link: https://commits.webkit.org/317643@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to