diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java index b575f69c30b173414dc767f8638f4d7ead047378..02bbc0f38d58c4933d907eba327c2fcb9450e926 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java @@ -119,8 +119,11 @@ public class DefaultGithubApplicationService implements GithubApplicationService @Override public Optional<PullRequest> getPullRequest(String installationId, String org, String repoName, Integer pullRequest) { String fullRepoName = GithubValidationHelper.getFullRepoName(org, repoName); + // create param map to better handle multiple PRs from a single repo in short time span + MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); + params.add(GitEcaParameterNames.PULL_REQUEST_NUMBER_RAW, Integer.toString(pullRequest)); return cache - .get(fullRepoName, new MultivaluedHashMap<>(), PullRequest.class, + .get(fullRepoName, params, PullRequest.class, () -> gh.getPullRequest(jwt.getGhBearerString(installationId), apiVersion, org, repoName, pullRequest)) .getData(); }