Skip to content

Commit

Permalink
fix copy/paste variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
egekocabas committed Jan 24, 2025
1 parent 286f2e3 commit 82d872e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,26 @@ public List<GHWorkflowRun> syncRunsOfRepository(
var workflowRuns = new ArrayList<GHWorkflowRun>();

while (iterator.hasNext()) {
var ghPullRequests = iterator.nextPage();
var keepPullRequests =
ghPullRequests.stream()
var ghWorkflowRuns = iterator.nextPage();
var keepWorkflowRuns =
ghWorkflowRuns.stream()
.filter(
pullRequest -> {
ghWorkflowRun -> {
try {
return sinceDate.isEmpty()
|| pullRequest.getUpdatedAt().after(sinceDate.get());
|| ghWorkflowRun.getUpdatedAt().after(sinceDate.get());
} catch (IOException e) {
log.error(
"Failed to filter workflow run {}: {}",
pullRequest.getId(),
ghWorkflowRun.getId(),
e.getMessage());
return false;
}
})
.toList();

workflowRuns.addAll(keepPullRequests);
if (keepPullRequests.size() != ghPullRequests.size()) {
workflowRuns.addAll(keepWorkflowRuns);
if (keepWorkflowRuns.size() != ghWorkflowRuns.size()) {
break;
}
}
Expand Down

0 comments on commit 82d872e

Please sign in to comment.