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

[JENKINS-68321] Call Connector.configureLocalRateLimitChecker more consistently #654

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,7 @@ public void visitSource(String sourceName, SCMSourceObserver observer) throws IO
}

try {
Connector.configureLocalRateLimitChecker(listener, github);
// Input data validation
if (credentials != null && !isCredentialValid(github)) {
String message = String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@ private static void retrievePullRequest(
// The probe github will be closed along with the probe.
final GitHub gitHub = Connector.connect(apiUri, credentials);
try {
Connector.configureLocalRateLimitChecker(listener, github);
ensureDetailedGHPullRequest(pr, listener, gitHub, ghRepository);
} finally {
Connector.release(gitHub);
Expand Down Expand Up @@ -1957,6 +1958,7 @@ protected List<Action> retrieveActions(@CheckForNull SCMSourceEvent event, @NonN
GitHub hub = Connector.connect(apiUri, credentials);
try {
Connector.checkConnectionValidity(apiUri, listener, credentials, hub);
Connector.configureLocalRateLimitChecker(listener, github);
try {
ghRepository = hub.getRepository(getRepoOwner() + '/' + repository);
resolvedRepositoryUrl = ghRepository.getHtmlUrl();
Expand Down