Alternative proposal

The guts of this version are a bit ugly but they result reasonable API code without a ton of extra
code needed.
This commit is contained in:
Liam Newman
2020-03-01 21:12:38 -08:00
parent 2607d6a107
commit b7de4359fd
3 changed files with 122 additions and 57 deletions

View File

@@ -1900,7 +1900,7 @@ public class GHRepository extends GHObject {
* the io exception
*/
public GHLabel createLabel(String name, String color) throws IOException {
return GHLabel.create(this, l -> l.name(name).color(color));
return GHLabel.create(this).name(name).color(color).done();
}
/**
@@ -1917,7 +1917,7 @@ public class GHRepository extends GHObject {
* the io exception
*/
public GHLabel createLabel(String name, String color, String description) throws IOException {
return GHLabel.create(this, l -> l.name(name).color(color).description(description));
return GHLabel.create(this).name(name).color(color).description(description).done();
}
/**