-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose the commit dates #300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smells like copy-paste bug
@@ -42,11 +42,19 @@ public GitUser getAuthor() { | |||
return author; | |||
} | |||
|
|||
public Date getAuthoredDate() { | |||
return GitHub.parseDate(author.date); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why authored
? It's AuthorDate
@WithBridgeMethods(value = GHAuthor.class, castRequired = true) | ||
public GitUser getCommitter() { | ||
return committer; | ||
} | ||
|
||
public Date getCommitDate() { | ||
return GitHub.parseDate(author.date); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what is the difference of this two methods? Copy-paste instead commit.date
?
@kohsuke did you review it or blindly merged and released? |
Good catch! I did look at the change but I missed it. I'll fix this and push out a new release. |
I'll leave the |
Good catch on the copy and paste. So I went with "commitDate" rather than "committerDate" and "authoredDate" vs "authorDate" as these are the dates of the respective actions. In a sense GitHub conflates the action with the person, and it just sounded wrong to my ear to say "getCommitterDate"... what's the committer date... does that method arrange for flowers a movie and a meal with the committer... ok, perhaps the committer deserves that as a reward for their work... that is more the date of the commit... closest analogy for author I could find was authored |
Question not in english, it not a novel. When you know API you can use library easily, otherwise you should scroll code/methods to get idea what they return. Also why you can't call getter().field yourself and need this proxy method? |
I need this for SCM API stuff