mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 15:50:52 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user