Add global node_id to GHObject + GHTeam extends GHObject

This commit is contained in:
Karol Lassak
2020-04-18 14:23:06 +02:00
parent 1f449c866e
commit fdcf74eaf2
4 changed files with 22 additions and 13 deletions

View File

@@ -28,6 +28,7 @@ public abstract class GHObject {
protected String url;
protected long id;
protected String node_id;
protected String created_at;
protected String updated_at;
@@ -123,6 +124,17 @@ public abstract class GHObject {
return id;
}
/**
* Get Global node_id from Github object.
*
* @see <a href="https://developer.github.com/v4/guides/using-global-node-ids/">Using Global Node IDs</a>
*
* @return Global Node ID.
*/
public String getNodeId() {
return node_id;
}
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Bridge method of getId")
private Object longToStringOrInt(long id, Class type) {
if (type == String.class)