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