Remove Lombok
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -32,11 +32,6 @@
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
|
||||
@@ -18,9 +18,6 @@ package io.spring.issuebot;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
|
||||
@@ -30,8 +27,6 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "issuebot.github")
|
||||
@Getter
|
||||
@Setter
|
||||
public class GitHubProperties {
|
||||
|
||||
@NestedConfigurationProperty
|
||||
@@ -40,11 +35,25 @@ public class GitHubProperties {
|
||||
@NestedConfigurationProperty
|
||||
private Credentials credentials = new Credentials();
|
||||
|
||||
public Repository getRepository() {
|
||||
return this.repository;
|
||||
}
|
||||
|
||||
public void setRepository(Repository repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
public Credentials getCredentials() {
|
||||
return this.credentials;
|
||||
}
|
||||
|
||||
public void setCredentials(Credentials credentials) {
|
||||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration for a GitHub repository.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Repository {
|
||||
|
||||
/**
|
||||
@@ -62,13 +71,35 @@ public class GitHubProperties {
|
||||
*/
|
||||
private List<String> collaborators;
|
||||
|
||||
public String getOrganization() {
|
||||
return this.organization;
|
||||
}
|
||||
|
||||
public void setOrganization(String organization) {
|
||||
this.organization = organization;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<String> getCollaborators() {
|
||||
return this.collaborators;
|
||||
}
|
||||
|
||||
public void setCollaborators(List<String> collaborators) {
|
||||
this.collaborators = collaborators;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration for the credentials used to authenticate with GitHub.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public static class Credentials {
|
||||
|
||||
/**
|
||||
@@ -81,6 +112,22 @@ public class GitHubProperties {
|
||||
*/
|
||||
private String password;
|
||||
|
||||
public String getUsername() {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return this.password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,16 +16,11 @@
|
||||
|
||||
package io.spring.issuebot;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* A repository that should be monitored.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public class MonitoredRepository {
|
||||
|
||||
/**
|
||||
@@ -38,4 +33,17 @@ public class MonitoredRepository {
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public MonitoredRepository(String organization, String name) {
|
||||
this.organization = organization;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getOrganization() {
|
||||
return this.organization;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
package io.spring.issuebot.feedback;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
||||
@@ -28,8 +25,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ConfigurationProperties(prefix = "issuebot.feedback")
|
||||
final class FeedbackProperties {
|
||||
|
||||
@@ -59,4 +54,44 @@ final class FeedbackProperties {
|
||||
*/
|
||||
private String closeComment;
|
||||
|
||||
public String getRequiredLabel() {
|
||||
return this.requiredLabel;
|
||||
}
|
||||
|
||||
public void setRequiredLabel(String requiredLabel) {
|
||||
this.requiredLabel = requiredLabel;
|
||||
}
|
||||
|
||||
public String getProvidedLabel() {
|
||||
return this.providedLabel;
|
||||
}
|
||||
|
||||
public void setProvidedLabel(String providedLabel) {
|
||||
this.providedLabel = providedLabel;
|
||||
}
|
||||
|
||||
public String getReminderLabel() {
|
||||
return this.reminderLabel;
|
||||
}
|
||||
|
||||
public void setReminderLabel(String reminderLabel) {
|
||||
this.reminderLabel = reminderLabel;
|
||||
}
|
||||
|
||||
public String getReminderComment() {
|
||||
return this.reminderComment;
|
||||
}
|
||||
|
||||
public void setReminderComment(String reminderComment) {
|
||||
this.reminderComment = reminderComment;
|
||||
}
|
||||
|
||||
public String getCloseComment() {
|
||||
return this.closeComment;
|
||||
}
|
||||
|
||||
public void setCloseComment(String closeComment) {
|
||||
this.closeComment = closeComment;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,14 +20,12 @@ import java.time.OffsetDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A comment that has been made on a GitHub issue.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public final class Comment {
|
||||
|
||||
private final User user;
|
||||
@@ -47,4 +45,12 @@ public final class Comment {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public User getUser() {
|
||||
return this.user;
|
||||
}
|
||||
|
||||
public OffsetDateTime getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,14 +20,12 @@ import java.time.OffsetDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* An event that has been performed on an {@link Issue}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class Event {
|
||||
|
||||
private final Type type;
|
||||
@@ -51,6 +49,18 @@ public class Event {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public OffsetDateTime getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public Label getLabel() {
|
||||
return this.label;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of an {@link Event}.
|
||||
*
|
||||
|
||||
@@ -128,7 +128,7 @@ public class GitHubTemplate implements GitHubOperations {
|
||||
return null;
|
||||
}
|
||||
ResponseEntity<T[]> contents = this.rest.getForEntity(url, type);
|
||||
return new StandardPage<T>(Arrays.asList(contents.getBody()),
|
||||
return new StandardPage<>(Arrays.asList(contents.getBody()),
|
||||
() -> getPage(getNextUrl(contents), type));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A GitHub issue.
|
||||
@@ -30,28 +28,20 @@ import lombok.Getter;
|
||||
*/
|
||||
public class Issue {
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final String url;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final String commentsUrl;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final String eventsUrl;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final String labelsUrl;
|
||||
|
||||
@Getter
|
||||
private final User user;
|
||||
|
||||
@Getter
|
||||
private List<Label> labels;
|
||||
|
||||
@Getter
|
||||
private final Milestone milestone;
|
||||
|
||||
@Getter
|
||||
private final PullRequest pullRequest;
|
||||
|
||||
/**
|
||||
@@ -83,6 +73,38 @@ public class Issue {
|
||||
this.pullRequest = pullRequest;
|
||||
}
|
||||
|
||||
String getUrl() {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
String getCommentsUrl() {
|
||||
return this.commentsUrl;
|
||||
}
|
||||
|
||||
String getEventsUrl() {
|
||||
return this.eventsUrl;
|
||||
}
|
||||
|
||||
String getLabelsUrl() {
|
||||
return this.labelsUrl;
|
||||
}
|
||||
|
||||
public User getUser() {
|
||||
return this.user;
|
||||
}
|
||||
|
||||
public List<Label> getLabels() {
|
||||
return this.labels;
|
||||
}
|
||||
|
||||
public Milestone getMilestone() {
|
||||
return this.milestone;
|
||||
}
|
||||
|
||||
public PullRequest getPullRequest() {
|
||||
return this.pullRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.url;
|
||||
|
||||
@@ -18,14 +18,12 @@ package io.spring.issuebot.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A label that can be applied to a GitHub issue.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class Label {
|
||||
|
||||
private final String name;
|
||||
@@ -39,4 +37,8 @@ public class Label {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,14 +18,12 @@ package io.spring.issuebot.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A milestone to which a GitHub Issue can be added.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class Milestone {
|
||||
|
||||
private final String title;
|
||||
@@ -39,4 +37,8 @@ public class Milestone {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,14 +18,12 @@ package io.spring.issuebot.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Details of a GitHub pull request.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class PullRequest {
|
||||
|
||||
private final String url;
|
||||
@@ -39,4 +37,8 @@ public class PullRequest {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,14 +18,12 @@ package io.spring.issuebot.github;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* A GitHub user.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
public class User {
|
||||
|
||||
private final String login;
|
||||
@@ -39,6 +37,10 @@ public class User {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
public String getLogin() {
|
||||
return this.login;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.login;
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
package io.spring.issuebot.triage;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
||||
@@ -28,8 +25,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ConfigurationProperties(prefix = "issuebot.triage")
|
||||
class TriageProperties {
|
||||
|
||||
@@ -38,4 +33,12 @@ class TriageProperties {
|
||||
*/
|
||||
private String label;
|
||||
|
||||
public String getLabel() {
|
||||
return this.label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user