Skip to content
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

Adds support for alternate accept header to retrieve star creation timestamps #1060

Merged
merged 1 commit into from
Jan 25, 2016
Merged

Adds support for alternate accept header to retrieve star creation timestamps #1060

merged 1 commit into from
Jan 25, 2016

Conversation

daveaglick
Copy link
Contributor

Resolves #1059

@daveaglick
Copy link
Contributor Author

Sorry, CI is coming up with errors I didn't catch on my local machine. Almost got it hammered out. I'll squash when I'm done and let you know when this is good for review.

@daveaglick
Copy link
Contributor Author

Okay, this should be good to go now. Travis is still reporting an error - looks like something in Octokit.Tests-Portable, but I don't know how to make heads or tails of it. Just let me know if it's something else I need to clean up.

@shiftkey
Copy link
Member

@daveaglick all good, there's some CI friction that I need to look into at some stage

[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class RepositoryStar
{
public RepositoryStar() { }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the empty ctors or the whole wrapping classes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The empty ctors. I ask because we've gone back and forth on how the response models should be structured in the past - previously the properties were public set-ers, but then we switched over to protected set to indicate which were required.

cc @haacked for feels

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main benefit for using protected set was around testability, but I'm not sure that's so important now in hindsight...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, gotcha. I just assumed they were needed by the model deserializer. If it can instantiate models without the empty public ctor, I'm fine removing them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, that's a good point - I had a look at some other response models and found they also have an empty ctor - hold off on making that change, I'll let @haacked refresh my memory here...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If memory serves me, we do need the default ctor for serialization.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shiftkey
Copy link
Member

@daveaglick thanks for this, and apologies for not getting to it weeks ago 😁

shiftkey added a commit that referenced this pull request Jan 25, 2016
Adds support for alternate accept header to retrieve star creation timestamps
@shiftkey shiftkey merged commit bf3a56b into octokit:master Jan 25, 2016
@daveaglick
Copy link
Contributor Author

👍 Thanks, no problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants