Skip to content

Commit 4d704bc

Browse files
authored
adds docs for public constructors to fix sonar issues (#1012)
1 parent c63add7 commit 4d704bc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

application/src/main/java/org/togetherjava/tjbot/commands/github/GitHubCommand.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ public final class GitHubCommand extends SlashCommandAdapter {
4444
private Instant lastCacheUpdate;
4545
private List<String> autocompleteGHIssueCache;
4646

47+
/**
48+
* Constructs an instance of GitHubCommand.
49+
*
50+
* This constructor initializes a new GitHubCommand with the specified GitHubReference. It also
51+
* sets the command name to "github-search" and the command description to "Search configured
52+
* GitHub repositories for an issue/pull request".
53+
*
54+
* @param reference The GitHubReference used for searching issue/pull request in configured
55+
* repositories.
56+
*/
4757
public GitHubCommand(GitHubReference reference) {
4858
super("github-search", "Search configured GitHub repositories for an issue/pull request",
4959
CommandVisibility.GUILD);

application/src/main/java/org/togetherjava/tjbot/commands/github/GitHubReference.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ public final class GitHubReference extends MessageReceiverAdapter {
5757
*/
5858
private List<GHRepository> repositories;
5959

60+
/**
61+
* Constructs an instance of GitHubReference.
62+
*
63+
* This constructor initializes a new GitHubReference with the specified Config. It also sets up
64+
* a predicate for matching allowed channels for feature and acquires repositories.
65+
*
66+
* @param config The Config to get allowed channel pattern for feature.
67+
*/
6068
public GitHubReference(Config config) {
6169
this.config = config;
6270
this.hasGithubIssueReferenceEnabled =

0 commit comments

Comments
 (0)