Skip to content

Commit b6920ef

Browse files
Merge pull request #24 from cortexapps/allow-access-to-raw-author
Allow Access to the raw author object for commits
2 parents 6596d17 + 094057a commit b6920ef

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.kohsuke</groupId>
44
<artifactId>cortexapps-github-api</artifactId>
5-
<version>1.319</version>
5+
<version>1.320</version>
66
<name>GitHub API for Java</name>
77
<url>https://github-api.kohsuke.org/</url>
88
<description>GitHub API for Java</description>

src/main/java/org/kohsuke/github/GHCommit.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,20 @@ public static class Parent {
253253
/**
254254
* The Class User.
255255
*/
256-
static class User {
256+
public static class User {
257257

258258
/** The gravatar id. */
259259
// TODO: what if someone who doesn't have an account on GitHub makes a commit?
260-
@SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "We don't provide it in API now")
261-
String url, avatar_url, gravatar_id;
260+
@SuppressFBWarnings(value = "UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD", justification = "used in backend code")
261+
public String url, avatar_url, gravatar_id;
262262

263263
/** The id. */
264264
@SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "We don't provide it in API now")
265265
int id;
266266

267267
/** The login. */
268-
String login;
268+
@SuppressFBWarnings(value = "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", justification = "used in backend code")
269+
public String login;
269270
}
270271

271272
/** The sha. */
@@ -471,6 +472,17 @@ public GHUser getAuthor() throws IOException {
471472
return resolveUser(author);
472473
}
473474

475+
/**
476+
* Gets author.
477+
*
478+
* @return the author
479+
* @throws IOException
480+
* the io exception
481+
*/
482+
public User getAuthorRaw() throws IOException {
483+
return author;
484+
}
485+
474486
/**
475487
* Gets the date the change was authored on.
476488
*

0 commit comments

Comments
 (0)