Enable automatic code formatter with CI validation

This may be controversial but it we're doing it. Having code formatting needs to be consistent
and a non-issue during code review. I'm willing modify the configuration if people see a strong
need, but formatting needs to be present and enforced.
This commit is contained in:
Liam Newman
2019-11-13 13:28:23 -08:00
parent 8943af9840
commit 9d8460bb81
169 changed files with 3851 additions and 4180 deletions

View File

@@ -37,7 +37,7 @@ public class GHProjectColumn extends GHObject {
}
public GHProject getProject() throws IOException {
if(project == null) {
if (project == null) {
try {
project = root.retrieve().to(getProjectUrl().getPath(), GHProject.class).wrap(root);
} catch (FileNotFoundException e) {
@@ -73,24 +73,17 @@ public class GHProjectColumn extends GHObject {
public PagedIterable<GHProjectCard> listCards() throws IOException {
final GHProjectColumn column = this;
return root.retrieve()
.withPreview(INERTIA)
.asPagedIterable(
String.format("/projects/columns/%d/cards", id),
GHProjectCard[].class,
item -> item.wrap(column) );
return root.retrieve().withPreview(INERTIA).asPagedIterable(String.format("/projects/columns/%d/cards", id),
GHProjectCard[].class, item -> item.wrap(column));
}
public GHProjectCard createCard(String note) throws IOException {
return root.retrieve().method("POST")
.withPreview(INERTIA)
.with("note", note)
return root.retrieve().method("POST").withPreview(INERTIA).with("note", note)
.to(String.format("/projects/columns/%d/cards", id), GHProjectCard.class).wrap(this);
}
public GHProjectCard createCard(GHIssue issue) throws IOException {
return root.retrieve().method("POST")
.withPreview(INERTIA)
return root.retrieve().method("POST").withPreview(INERTIA)
.with("content_type", issue instanceof GHPullRequest ? "PullRequest" : "Issue")
.with("content_id", issue.getId())
.to(String.format("/projects/columns/%d/cards", id), GHProjectCard.class).wrap(this);