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

Add overloads to the GetAll methods in the IEventsClient #1240

Merged
merged 22 commits into from
Apr 10, 2016

Conversation

SamTh3D3v
Copy link
Contributor

@SamTh3D3v SamTh3D3v commented Apr 4, 2016

Refer to the issue #1153

  • Add an overload for the GetAll* methods on IEventsClient with the ApiOptions parameter.
  • Implement the the GetAll* method in the EventsClient class.
  • Add an overload for the GetAll* methods to the IObservableEventsClient with the ApiOptions parameter.
  • Implement the GetAll* methods in the ObservableEventsClient class.
  • Implement the needed tests in the EventsClientTests class.
  • Implement the required integration tests in the ObservableEventsClientTests class.

@ryangribble
Copy link
Contributor

Just wondering if you're aware you've got 2 separate github accounts involved here... @samthedev is what you're logged into github.com as, but all your commits are coming from @UsamTheDev 😀

@SamTh3D3v
Copy link
Contributor Author

@ryangribble Yes, that might be an issue that need to be reported, the thing is that i am sending commits from vs, and even though i am logged in as @samthedev, the commits keep coming as @UsamTheDev (another Github account i've created once for testing purposes )

image

To fix this mess i am guessing that i need to merge the two accounts, not sure how to do that, you can probably save me the googling time :^3

@ryangribble
Copy link
Contributor

not sure about being logged in from VS but its all down to the email address associated with the commits. All I do is have a couple of email addresses (eg work and personal) both associated with my one github account and things work fine that way. Im not sure in your situation with the added complexity of one of those email addresses already belonging to "another" github user (ie your 2econd account). Perhaps if you change that account's email address first, then add both email addresses to your main account. Alternatively, just change your VS settings so the email address is the right one and not worry about the historic commits (although its always nice to have all your commits against your own account so the contributors page is accurate!)

@SamTh3D3v
Copy link
Contributor Author

Yes, changing the email in the vs settings pane did solve the issue, thx... it would be great if i can change the author of the older commits as well, is there an easy way to do that ?

@shiftkey
Copy link
Member

shiftkey commented Apr 5, 2016

it would be great if i can change the author of the older commits as well, is there an easy way to do that ?

You should check your email addresses defined on GitHub as well

@SamTh3D3v
Copy link
Contributor Author

@shiftkey Yes that did it (after deleting the other github account )..thx

await Assert.ThrowsAsync<ArgumentNullException>(() => releasesClient.GetAll("owner", null));
await Assert.ThrowsAsync<ArgumentException>(() => releasesClient.GetAll("owner", ""));
await Assert.ThrowsAsync<ArgumentNullException>(() => releasesClient.GetAll("owner", "name", null));
Copy link
Member

Choose a reason for hiding this comment

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

We should probably check ("", "name", ApiOptions.None) and ("owner", "", ApiOptions.None) as well

Copy link
Member

Choose a reason for hiding this comment

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

I think this one was overlooked with the cleanup

@shiftkey
Copy link
Member

shiftkey commented Apr 5, 2016

@samthedev just did a pass over all the files in this PR, mostly focusing on the test changes. Looking good!

_user = github.User.Current().Result.Login;
_organization = github.Organization.GetAllForCurrent().Result.First().Login;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shiftkey pls, i need some help with the GetAllForAnOrganization Method's IntegrationTests ! since the user must be authenticated and the organisation must be associated with that particular user !

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you configured your integration test settings with a test user (and test organization that this user is an owner of) created specifically for running the integration tests (so as not to mess up your personal account or rate limits etc)?

Then in integration tests, you can get that configured organization just with Helper.Organization (same as you can get the integration user with Helper.UserName)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ryangribble thx, i miss configured some of the settings, i will try to fix the failing test then i will report back.

Copy link
Contributor Author

@SamTh3D3v SamTh3D3v Apr 6, 2016

Choose a reason for hiding this comment

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

All tests passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TheGetAllForRepositoryMethod's tests are still failing for some reason !?

Copy link
Member

Choose a reason for hiding this comment

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

I don't believe the test failure is related to this PR.

Here's what I can see: #1251

@shiftkey
Copy link
Member

shiftkey commented Apr 7, 2016

It looks like a .swp file was committed in c32dfbe - are you able to remove that from the history?

@SamTh3D3v
Copy link
Contributor Author

It looks like a .swp file was committed in c32dfbe - are you able to remove that from the history?

done.

@shiftkey
Copy link
Member

Just one more little bit of cleanup that was missed. I'll verify the tests later this week as I'm on terrible internets right now...

@shiftkey
Copy link
Member

Oh, and that merge conflict 😢

@SamTh3D3v
Copy link
Contributor Author

Yy, my bad ...I believe that's because i touched ReleasesClientTests in 7f93dad, should i undo the changes on that file ?

@shiftkey
Copy link
Member

@samthedev up to you - I'd suggest just merging master in again...

@SamTh3D3v
Copy link
Contributor Author

@shiftkey that should do it, right ?

@shiftkey
Copy link
Member

@SamTh3D3v
Copy link
Contributor Author

@shiftkey done.

@shiftkey
Copy link
Member

Cross-referencing #1251 again to remind myself about digging into that...

@shiftkey
Copy link
Member

@samthedev thanks!

@shiftkey shiftkey merged commit 4ae6000 into octokit:master Apr 10, 2016
@SamTh3D3v SamTh3D3v deleted the PaginationEventsClient branch April 11, 2016 15:58
@shiftkey shiftkey modified the milestone: Pagination Support Jun 3, 2016
@shiftkey shiftkey mentioned this pull request Jun 12, 2016
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