Skip to content

feat(api): Add support for new runner creation API #2635

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

Merged
merged 3 commits into from
Aug 27, 2023

Conversation

lgatellier
Copy link
Contributor

Changes

This PR adds support for GitLab's new runner creation API POST /user/runners.
Closes #2606

Documentation and testing

@lgatellier
Copy link
Contributor Author

lgatellier commented Aug 8, 2023

Not sure if unit tests fits into test_runners.py. Could also be into test_users.py.

Please tell me if I should move them.

@lgatellier lgatellier force-pushed the feat/runner-new-registration branch from b37203c to a779089 Compare August 8, 2023 21:55
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #2635 (366894b) into main (9b6d89e) will increase coverage by 4.26%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2635      +/-   ##
==========================================
+ Coverage   92.09%   96.36%   +4.26%     
==========================================
  Files          87       87              
  Lines        5658     5666       +8     
==========================================
+ Hits         5211     5460     +249     
+ Misses        447      206     -241     
Flag Coverage Δ
api_func_v4 82.72% <100.00%> (?)
cli_func_v4 83.18% <100.00%> (+0.02%) ⬆️
unit 88.01% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
gitlab/v4/objects/users.py 96.51% <100.00%> (+6.11%) ⬆️

... and 35 files with indirect coverage changes

@lgatellier lgatellier changed the title Add support for new runner creation API feat(api): Add support for new runner creation API Aug 8, 2023
@JohnVillalovos JohnVillalovos force-pushed the feat/runner-new-registration branch from a779089 to 00c3a8d Compare August 19, 2023 06:20
@JohnVillalovos
Copy link
Member

Not sure if unit tests fits into test_runners.py. Could also be into test_users.py.

Please tell me if I should move them.

In my opinion it should be in the test_users.py file since that is where the code is that it is testing.

But otherwise this looks good to me.

@JohnVillalovos JohnVillalovos force-pushed the feat/runner-new-registration branch from 00c3a8d to c81eb57 Compare August 19, 2023 06:29
@lgatellier lgatellier force-pushed the feat/runner-new-registration branch 2 times, most recently from fd02584 to 0236d96 Compare August 19, 2023 08:38
@lgatellier
Copy link
Contributor Author

lgatellier commented Aug 19, 2023

Hi @JohnVillalovos, and thanks for your feedback !

I moved the unit test into test_users.py , and fixed a little doc issue in my project runner creation example (which was using group_id instead of project_id).

@lgatellier lgatellier force-pushed the feat/runner-new-registration branch from 0236d96 to 36ae841 Compare August 19, 2023 08:46
@JohnVillalovos
Copy link
Member

JohnVillalovos commented Aug 19, 2023

@lgatellier Thanks for the PR!

Left comments to have it work like the other endpoints that use /user/*. Please let me know if you disagree with my thoughts.

@JohnVillalovos JohnVillalovos force-pushed the feat/runner-new-registration branch from 36ae841 to 16ff385 Compare August 19, 2023 23:42
@lgatellier lgatellier force-pushed the feat/runner-new-registration branch from 16ff385 to 004a51a Compare August 26, 2023 09:38
@lgatellier lgatellier force-pushed the feat/runner-new-registration branch from 50bc028 to ad7a58a Compare August 26, 2023 09:47
@nejch
Copy link
Member

nejch commented Aug 27, 2023

Thanks a lot @lgatellier @JohnVillalovos I just pushed a minor typo suggestion so that we can get this in and continue with the tasks before the next scheduled release. If you see anything else just open a follow-up :)

@nejch nejch merged commit 4abcd17 into python-gitlab:main Aug 27, 2023
@lgatellier lgatellier deleted the feat/runner-new-registration branch August 27, 2023 12:12
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.

Support User Runner Registration
3 participants