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

Fork/Hook issue #698 #776

Merged
merged 45 commits into from May 13, 2015
Merged

Fork/Hook issue #698 #776

merged 45 commits into from May 13, 2015

Conversation

kristianhald
Copy link
Contributor

Hi,

First time doing a pull request, so if I have done anything different than expected, then I would be happy to know.

I have tried continuing on the pr for the issue #495, where it was stated that it was missing integration tests.

Therefore, I would like to have some input on the changes made and if I have missed anything, that needs to be changed.

I have done the following changes to the code:

  • Updated the previous code to match current convention rules and changes made in the interfaces
  • Implemented integration tests for the forks api
  • Implemented integration tests for the hooks api
  • Implemented hooks ping command
  • Added 'sort' parameter to forks list command
  • Merged master into the branch to get the code up to date as the original pull request was old

Tasks missing:

  • Waiting for response from GitHub on error reported, when creating a hook and stating it should be 'active' = false, then it is created as 'active' = true. Minor error, but I have a test checking it and I do not like having a test that creates active web hooks (I can change the assert, but as I would like some input on the code, there is some time)

AndyCross and others added 30 commits January 19, 2014 20:36
…rated out - there doesn't need to be this duplicitous 'clarity' given the classes are now separate
Conflicts:
	Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
	Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
	Octokit.Reactive/Octokit.Reactive-Mono.csproj
	Octokit.Reactive/Octokit.Reactive-MonoAndroid.csproj
	Octokit.Reactive/Octokit.Reactive-Monotouch.csproj
	Octokit.Reactive/Octokit.Reactive.csproj
	Octokit/Octokit-Mono.csproj
	Octokit/Octokit-Monotouch.csproj
	Octokit/Octokit-netcore45.csproj
	Octokit/Octokit.csproj
Conflicts:
	Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
	Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
	Octokit.Reactive/Octokit.Reactive-Mono.csproj
	Octokit.Reactive/Octokit.Reactive-MonoAndroid.csproj
	Octokit.Reactive/Octokit.Reactive-Monotouch.csproj
	Octokit.Tests/OctoKit.Tests-NetCore45.csproj
	Octokit/Helpers/ApiUrls.cs
	Octokit/Octokit-Mono.csproj
	Octokit/Octokit-Monotouch.csproj
	Octokit/Octokit-Portable.csproj
	Octokit/Octokit-netcore45.csproj
@kristianhald
Copy link
Contributor Author

Hi @shiftkey thanks for the comments on the code and the design. I have cleaned it up and added the Post method.
I have added to each of your comments a short description of the change I have made in the code and I have tried keeping the changes in their own commits, so that you can compare the changes.

The 'Changed await AssertEx.Throws' to 'Assert.ThrowsAsync' is wrong. I accidentally also removed the 'await'. They have been added again to the tests in a later commit.

I ran a bit out of time here at the last moment, so I hope everything is ok. Please write back in regards to any changes that needs to be added.

@kristianhald
Copy link
Contributor Author

hi @shiftkey, Just wanted to make certain that the code is ok and not missing anything. I did the merge and solved the conflicts. I think that the merge from master must be done close to the merge to master. If the code changes are ok, I will do another merge.

@kbilsted
Copy link

kbilsted commented May 4, 2015

What is the status of this PR? I really need the features it adds.

@shiftkey
Copy link
Member

shiftkey commented May 4, 2015

@kristianhald apologies for the delay - I've just gotten back from BUILD so am digging myself out of inbox hell. I'll add this to the list of things to review today. There's a merge conflict with the branch, but we can address that separate to the changes here.

@kbilsted
Copy link

kbilsted commented May 4, 2015

@shiftkey Great stuff. As long as I know this is on your radar, I can wait a few more cycles :-)

{
var client = new RepositoriesClient(Substitute.For<IApiConnection>());

await Assert.ThrowsAsync<ArgumentNullException>(async () => await client.Forks.GetAll(null, "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.

💄 the inner async/await pair can be scrubbed from these files, i.e. () => client.Forks....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gone @ 🔫 point. They wanted soo much to 💤

@shiftkey
Copy link
Member

shiftkey commented May 8, 2015

@kristianhald looking good, just a bit of cleanup for the tests and merging master in and I'm happy to take this.

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Octokit.Tests.Helpers;
Copy link
Member

Choose a reason for hiding this comment

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

🔥 unnecessary using statement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😔 Has been removed.

@kristianhald
Copy link
Contributor Author

Thanks for the review @shiftkey. I will look into the issues tonight after work.

Conflicts:
	Octokit/Octokit-MonoAndroid.csproj
	Octokit/Octokit-Monotouch.csproj
@kristianhald
Copy link
Contributor Author

@shiftkey, review changes have been made, including a merge handling the conflicts.
I hope everything is well else you know how to get a hold of me 📧

Assert.Equal(true, forkCreated.Fork);
}

[IntegrationTest]
Copy link
Member

Choose a reason for hiding this comment

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

Change this attribute to [OrganizationTest] so that it only runs if you have the right environment variables set 🤘

@shiftkey
Copy link
Member

Just that one test attribute and this is good to merge!

EDIT: whatever, I'm impatient. I'll fix that up on master.

shiftkey added a commit that referenced this pull request May 13, 2015
@shiftkey shiftkey merged commit e4d25a3 into octokit:master May 13, 2015
@shiftkey
Copy link
Member

Thanks for the amazing work @kristianhald

@shiftkey shiftkey mentioned this pull request May 13, 2015
2 tasks
@kristianhald
Copy link
Contributor Author

Thanks and thanks for the merge. 👌

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.

None yet

5 participants