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 group labels and issues methods #99

Merged
merged 9 commits into from
Jan 13, 2020
Merged

add group labels and issues methods #99

merged 9 commits into from
Jan 13, 2020

Conversation

WebDucer
Copy link
Contributor

@WebDucer WebDucer commented Dec 18, 2019

fixes #97

@WebDucer
Copy link
Contributor Author

@Casz @nmklotas Should I create a new PR for group issues, or can I add this tho PR?

- Add some missing issue query parameters
- Add `GetAllAsync` endpoint to query issue for project, group or all
- Mark `GetAsync` endpoint for issue list (for all and project) as deprecated
- Simplify use of issue query options (no need for specific project version) - exists only for backward compatibility
@WebDucer
Copy link
Contributor Author

Added list group issues endpoint

@codecov-io
Copy link

codecov-io commented Dec 18, 2019

Codecov Report

Merging #99 into master will increase coverage by 3.67%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   68.83%   72.51%   +3.67%     
==========================================
  Files         135      143       +8     
  Lines        1980     2059      +79     
==========================================
+ Hits         1363     1493     +130     
+ Misses        617      566      -51
Impacted Files Coverage Δ
...t/Models/Webhooks/Requests/CreateWebhookRequest.cs 0% <ø> (ø) ⬆️
...Client/Models/Oauth/Requests/AccessTokenRequest.cs 100% <100%> (ø)
...piClient/Models/Trees/Requests/TreeQueryOptions.cs 100% <100%> (ø)
src/GitLabApiClient/Models/Files/Responses/File.cs 100% <100%> (ø)
.../GitLabApiClient/Internal/Http/GitLabHttpFacade.cs 95.55% <100%> (+29.84%) ⬆️
...c/GitLabApiClient/Internal/Queries/QueryBuilder.cs 88.37% <100%> (ø) ⬆️
src/GitLabApiClient/GitLabClient.cs 100% <100%> (+28.12%) ⬆️
src/GitLabApiClient/TreesClient.cs 100% <100%> (ø)
...ient/Models/Oauth/Responses/AccessTokenResponse.cs 100% <100%> (ø)
src/GitLabApiClient/Models/Trees/Responses/Tree.cs 100% <100%> (ø)
... and 16 more

@WebDucer WebDucer changed the title Feature/97 group labels Feature/97 group labels and issues Dec 18, 2019
Copy link
Collaborator

@jetersen jetersen left a comment

Choose a reason for hiding this comment

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

LGTM, two minor nits

src/GitLabApiClient/IssuesClient.cs Show resolved Hide resolved
src/GitLabApiClient/IssuesClient.cs Outdated Show resolved Hide resolved
@jetersen
Copy link
Collaborator

jetersen commented Dec 20, 2019

Would you mind waiting on me merging this till I have fixed/merged #100 I'd like to finish it this weekend :)

@WebDucer
Copy link
Contributor Author

Would you mind waiting on me merging this till I have fixed/merged #100 I'd like to finish it this weekend :)

No problem. I'm on vacations till 7th January 😉 . I will have a look on my GH account, but I have no test system till I'll be back.

@jetersen
Copy link
Collaborator

@WebDucer integration tests are failing, seems your using project id instead of group id helper :D

@WebDucer
Copy link
Contributor Author

@Casz Will check this week. I'll try to get the Docker test environment running on my macOS.

@jetersen
Copy link
Collaborator

All you need is docker to be installed.

The unit test will take care of doing the docker run command

@WebDucer
Copy link
Contributor Author

@Casz I had problems to get this running on Windows (in my job) 😄 . Now I will try this at home on Mac.

@jetersen
Copy link
Collaborator

As part of #100 I fixed the whole docker container setup. Not using a persisted volume and each time you run the unit test you get a fresh instance. So it should run a lot smoother. From my experience on PRs and builds on master the integrations works each time! 😍

@jetersen
Copy link
Collaborator

jetersen commented Dec 31, 2019

Please do report back if you can get it to work for both Windows and Mac.

You just have to run dotnet test --verbosity normal
The test suite waits for the gitlab container to report healthy status.
You can monitor this with docker ps

Windows 10 you need to use docker for desktop running in Linux containers mode.
Windows 2019 Server you need to enable experimental feature that allows to run LCOW (Linux Containers on Windows)
Mac/Linux only needs docker-ce edition.
You can also use docker for desktop on mac.

@jetersen jetersen mentioned this pull request Jan 2, 2020
# Conflicts:
#	test/GitLabApiClient.Test/Internal/Queries/ProjectIssuesQueryBuilderTest.cs
@WebDucer
Copy link
Contributor Author

WebDucer commented Jan 6, 2020

@Casz Fixed tests and integrated the current master. Switched form .Be to .BeEquivalentTo comparisson. Seems the UrlEncode behaves different on different platforms (e.g.: : is encoded as %3A or %3a).

@jetersen
Copy link
Collaborator

jetersen commented Jan 6, 2020

Thanks 🙏

@jetersen
Copy link
Collaborator

jetersen commented Jan 6, 2020

Did you get to test the unit tests on both Windows and Mac? 🤔

@WebDucer
Copy link
Contributor Author

WebDucer commented Jan 6, 2020

@Casz No, only on macOS, have no Windows at home. Will try it tomorrow on Windows at office (first day after vacations).

@WebDucer
Copy link
Contributor Author

WebDucer commented Jan 7, 2020

@Casz Tested on Windows. It works on my side. All tests are green.

@jetersen
Copy link
Collaborator

jetersen commented Jan 7, 2020

Great, I'll give it a quick review once my laptop is not bitlocked 😭

Soon one of these days I am throwing Linux on this laptop

Copy link
Collaborator

@jetersen jetersen left a comment

Choose a reason for hiding this comment

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

Hmm we properly want to fix the tests using an obsolete method :)

https://github.com/nmklotas/GitLabApiClient/pull/99/checks?check_run_id=375571104
image

@WebDucer
Copy link
Contributor Author

WebDucer commented Jan 7, 2020

@Casz You are right, blaim on me 😉 The deprecated calls are fixed in tests.

@jetersen
Copy link
Collaborator

jetersen commented Jan 7, 2020

I liked the fact that we could see annotated issues right in the pull requests.

@jetersen jetersen changed the title Feature/97 group labels and issues add group labels and issues methods Jan 7, 2020
@jetersen jetersen merged commit fb4aae7 into nmklotas:master Jan 13, 2020
@WebDucer WebDucer deleted the feature/97_group_labels branch February 3, 2020 06:02
MindaugasLaganeckas pushed a commit to MindaugasLaganeckas/GitLabApiClient that referenced this pull request Mar 9, 2021
* nmklotas#97 Add support for group labels

* nmklotas#97 Add query options for group label list request

* nmklotas#97 Add group issue list endpoint

- Add some missing issue query parameters
- Add `GetAllAsync` endpoint to query issue for project, group or all
- Mark `GetAsync` endpoint for issue list (for all and project) as deprecated
- Simplify use of issue query options (no need for specific project version) - exists only for backward compatibility

* Fix formatting

* nmklotas#97 Small refactorings and documentation

* Fix unit test (nmklotas#97)

* Fix deprecated calls in tests

Co-authored-by: Joseph Petersen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get issues from Group of projects
3 participants