20
20
import java .util .concurrent .TimeUnit ;
21
21
import java .util .stream .Collectors ;
22
22
import org .jspecify .annotations .NonNull ;
23
+ import org .jspecify .annotations .Nullable ;
23
24
import org .slf4j .Logger ;
24
25
import org .springframework .stereotype .Service ;
25
26
@@ -47,10 +48,10 @@ public GitHubCache(@NonNull final IssueServiceProperties properties, final GitHu
47
48
log .info ("Updating cache" );
48
49
final List <RepositoryProperty > repos = properties .getRepositories ();
49
50
repos .forEach (repo -> updateContributors (repo .org (), repo .repo ()));
50
- repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), GOOD_FIRST_ISSUE_LABEL ));
51
- repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), GOOD_FIRST_ISSUE_CANDIDATE_LABEL ));
52
- repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), HACKTOBERFEST_LABEL ));
53
- repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), HELP_WANTED_LABEL ));
51
+ repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), repo . excludeIdentifiers (), GOOD_FIRST_ISSUE_LABEL ));
52
+ repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), repo . excludeIdentifiers (), GOOD_FIRST_ISSUE_CANDIDATE_LABEL ));
53
+ repos .forEach (repo -> updateIssues (repo .org (), repo .repo (),repo . excludeIdentifiers (), HACKTOBERFEST_LABEL ));
54
+ repos .forEach (repo -> updateIssues (repo .org (), repo .repo (), repo . excludeIdentifiers (), HELP_WANTED_LABEL ));
54
55
log .info ("Cache updated. Found {} contributors and {} issues" , getContributors ().size (), getAllIssues ().size ());
55
56
} catch (final Exception e ) {
56
57
log .error ("Failed to update cache" , e );
@@ -70,11 +71,11 @@ private void updateContributors(@NonNull final String org, @NonNull final String
70
71
}
71
72
}
72
73
73
- private void updateIssues (@ NonNull final String org , @ NonNull final String repo , @ NonNull final String label ) {
74
+ private void updateIssues (@ NonNull final String org , @ NonNull final String repo , @ Nullable List < String > excludedIdentifiers , @ NonNull final String label ) {
74
75
try {
75
76
log .info ("Updating issues cache for repo '{}/{}' with label '{}'" , org , repo , label );
76
77
final Repository repository = gitHubClient .getRepository (org , repo );
77
- final List <Issue > issues = gitHubClient .getIssues (repository , label );
78
+ final List <Issue > issues = gitHubClient .getIssues (repository , label , excludedIdentifiers );
78
79
log .info ("Found {} issues for repo '{}/{}' with label '{}'" , issues .size (), org , repo , label );
79
80
this .issuesCache .put (hash (org , repo , label ), issues );
80
81
} catch (final Exception e ) {
0 commit comments