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

added new parameters to RepositoryRequest.cs #1096

Merged
merged 4 commits into from
Feb 11, 2016

Conversation

Sarmad93
Copy link
Contributor

@Sarmad93 Sarmad93 commented Feb 7, 2016

As per the issue #1065 opened by @shiftkey, i have added new parameters to RepositoryRequest class.

CollaboratorAndOrganizationMember,

/// <summary>
/// Returns all repositories where user is owner,collaborator and organization member.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be or organization member

@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 7, 2016

There seems to be a lot white space that could be cleaned up.
If you are using visual studio 2013 or higher, pressing ctrl + K, d should take care of the formatting. Otherwise it will just have to take the time that it takes.

@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 7, 2016

@M-Zuber thanks for correction! i am fixing this.

/// Gets or sets the visibility property.
/// </summary>
/// <value>
/// The public.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be The visibility no?

@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 7, 2016

@M-Zuber is it right now? if there are any mistakes further please let me know. thanks

@@ -103,4 +119,70 @@ public enum RepositorySort
[Parameter(Value = "full_name")]
FullName
}


Copy link
Contributor

Choose a reason for hiding this comment

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

white space

@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 7, 2016

I apologize for being picky, it is an issue that I have.
Other then the little things I pointed out, it looks awesome 👍

@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 8, 2016

I can understand your point as this is an official repository of github api wrapper, these things(comment typos etc) really matter. I will push another commit when i will reach home.thanks again for correction. I appreciate it.

@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 8, 2016

😄

@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 8, 2016

Hi @M-Zuber i need your help one more time 😄 please review this when you are free.thanks

@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 8, 2016

LGTM, but I do not have commit rights, so you will have to wait for one of the maintainers to confirm and merge.
How do you feel about trying to add some tests for these changes in the meantime?

@ryangribble
Copy link
Contributor

Regarding Unit Tests, I'd suggest it would be good to add a couple more similar to these:

TheGetAllForCurrentMethod.CanFilterByType()
TheGetAllForCurrentMethod.CanFilterBySort()
TheGetAllForCurrentMethod.CanFilterBySortDirection()

eg

CanFilterByVisibility
CanFilterByAffiliation

@shiftkey shiftkey self-assigned this Feb 8, 2016
@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 8, 2016

@ryangribble unit tests 😕 it is difficult for me to write solid unit test i doubt that i will miss something in testing. it would be good if any one with testing knowledge should write test for these properties. what do you say?

@shiftkey
Copy link
Member

shiftkey commented Feb 8, 2016

@M-Zuber @ryangribble thanks for the initial review 💎

@Sarmad93 I think writing these tests is actually easier that you suspect - we have a lot of tests already defined for RepositoryClient, and you can likely repurpose some of the existing tests that @ryangribble linked to.

The goal of these tests is to verify a small piece of behaviour - in this case, what we're interested in is the mapping of the parameters on the request to the URL that gets invoked by the client. The setup is what's called AAA syntax - Arrange, Act and Assert, and they're intended to be short, easy to read and quick to execute.

Have a read of the links above, feel free to ask questions - but don't be afraid to take a shot at it 😁

@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 8, 2016

yes @shiftkey you are absolutely right 👍 I am new to this open source work that's why i am little afraid for now. As i was reading the links above i realized that i have lot to learn. Your code base has nice documentation and nice language idioms especially linq queries are written very well. what we learn in our programming classes is totally different here in open source world. Thanks 😄

@haacked
Copy link
Contributor

haacked commented Feb 8, 2016

I am new to this open source work that's why i am little afraid for now.

Welcome!

We're all friendly here. We love having people help out in any way they see fit. We all have other responsibilities because of our work, so we can be slow to reply sometimes. But don't hesitate to ask questions. We want your first open source experience to be great so maybe you'll contribute again! 😄

@Sarmad93
Copy link
Contributor Author

Sarmad93 commented Feb 9, 2016

Ok i will try to write unit test similar to above links tonight and will ask for the help if i get stuck.

@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 9, 2016

Good luck!

@haacked
Copy link
Contributor

haacked commented Feb 11, 2016

Well done!

jgttfp

haacked added a commit that referenced this pull request Feb 11, 2016
…sitory

added new parameters to RepositoryRequest.cs
@haacked haacked merged commit ee71652 into octokit:master Feb 11, 2016
@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 12, 2016

Noice!!
:shipit:

@Sarmad93
Copy link
Contributor Author

Thank you everyone for helping me out especially @M-Zuber for initial review. You guys are really helpful. 😃

@M-Zuber
Copy link
Contributor

M-Zuber commented Feb 13, 2016

:blushing:

@Sarmad93
Copy link
Contributor Author

@haacked is it really you in the gif? 😆

@haacked
Copy link
Contributor

haacked commented Feb 17, 2016

@haacked is it really you in the gif?

Yup!

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.

5 participants