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

Implement Repository Pages client #1061

Merged
merged 12 commits into from
Jan 26, 2016

Conversation

M-Zuber
Copy link
Contributor

@M-Zuber M-Zuber commented Jan 15, 2016

Fixes #1033
TODO:

  • 💄 usings
  • Tests: unit
  • Implementation of the client
  • IObservables + impl

Questions:

  • The following is an undocumented endpoint.
 - GET /repos/:owner/:repo/pages/builds:buildID

Should it be included?

  • The response includes an error field which seems to be mapped to the ApiError class. Does that get included in the model?

Drawing attention

  • Do enums get their own file?
  • Is an implementation needed for DebuggerDisplay?
  • What is the level of importance of integration tests for such a client?

@M-Zuber M-Zuber changed the title [WIP] Implement Repository Pages client #1033 [WIP] Implement Repository Pages client Jan 16, 2016
@shiftkey
Copy link
Member

The following is an undocumented endpoint. ... Should it be included?

Let's stick to things which are documented for now.

The response includes an error field which seems to be mapped to the ApiError class. Does that get included in the model?

I think I'm fine with using ApiError here, but it's hard to say whether there's more properties which aren't displayed in the sample responses included here...

@M-Zuber M-Zuber force-pushed the IRepositoryPagesClient branch from 912f3ad to 15c8ff9 Compare January 18, 2016 21:20
@M-Zuber M-Zuber changed the title [WIP] Implement Repository Pages client Implement Repository Pages client Jan 20, 2016
@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 20, 2016

I believe I am done, but not sure how to fix the errors re missing files.

cc @shiftkey or @haacked

@shiftkey
Copy link
Member

not sure how to fix the errors re missing files.

.\build FixProjects should add all files from Octokit.csproj to the cascading projects...

@M-Zuber M-Zuber force-pushed the IRepositoryPagesClient branch from ee3ec4e to 0435cd2 Compare January 20, 2016 13:39
@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 20, 2016

Should be done then. Thanks for the help

@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 21, 2016

🎉 The errors are not my fault (I think 😄 )
@shiftkey this should be complete for real now

@shiftkey
Copy link
Member

Holding off on merging this until I can give a better answer on what is happening with #1062

@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 21, 2016

👍

@@ -9,6 +11,7 @@ namespace Octokit
#if !NETFX_CORE
[Serializable]
#endif
[DebuggerDisplay("{DebuggerDisplay,nq}")]
Copy link
Member

Choose a reason for hiding this comment

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

Were these raised because of specific errors with tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since I added the Error Property the conventon test picked it up

Copy link
Member

Choose a reason for hiding this comment

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

Uh, cool? 👍

@shiftkey
Copy link
Member

Found out why #1062 is occurring and it's an orthogonal discussion to this.

Just a couple of comments about naming things (favouring simpler wherever possible). Everything else looks 💎

/// </summary>
public PagesBuildStatus Status { get; protected set; }
/// <summary>
///
Copy link
Member

Choose a reason for hiding this comment

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

Can has some words?

@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 25, 2016

@shiftkey it is ready for a re-review

/// See the <a href="https://developer.github.com/v3/repos/pages/#list-latest-pages-build">API documentation</a> for more information.
/// </remarks>
/// <returns></returns>
public IObservable<PagesBuild> GetLatestBuild(string owner, string repositoryName)
Copy link
Member

Choose a reason for hiding this comment

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

This will need a rename (and to call the right method on IRepositoryPagesClient)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I missed that :sad:

@shiftkey
Copy link
Member

There's also a merge conflict that needs a bit of love here...

@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 26, 2016

@shiftkey look quick, it is still green 😄

@shiftkey
Copy link
Member

@M-Zuber quick! merged!

shiftkey added a commit that referenced this pull request Jan 26, 2016
@shiftkey shiftkey merged commit 0c4fff0 into octokit:master Jan 26, 2016
@M-Zuber
Copy link
Contributor Author

M-Zuber commented Jan 26, 2016

😆

Thank you for all help. This PR helped me much better understand the structure of octokit.


client.Get("fake", "repo");

connection.Received().Get<Page>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/pages"), null);
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how these tests should have passed before the merge, as I managed to break an old PR when I merged master back in. See 5ca6633 for the fix to these tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh!
I was going to remove that. Should I open a new PR?

Copy link
Member

Choose a reason for hiding this comment

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

Nah, I'll merge that first pass at the documentation into master - so the fix will land there soon.

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.

2 participants