Skip to content

feat(api): add project label promotion - #1610

Merged
nejch merged 1 commit into
python-gitlab:mainfrom
StingRayZA:add-label-promote
Oct 20, 2021
Merged

feat(api): add project label promotion#1610
nejch merged 1 commit into
python-gitlab:mainfrom
StingRayZA:add-label-promote

Conversation

@StingRayZA

Copy link
Copy Markdown
Contributor

Adds a mixin that allows the /promote endpoint to be called on project labels.

Fixes #1602

@codecov-commenter

codecov-commenter commented Sep 27, 2021

Copy link
Copy Markdown

Codecov Report

Merging #1610 (c26b619) into master (a5d8b7f) will increase coverage by 0.03%.
The diff coverage is 95.65%.

@@            Coverage Diff             @@
##           master    #1610      +/-   ##
==========================================
+ Coverage   91.57%   91.61%   +0.03%     
==========================================
  Files          74       74              
  Lines        4263     4294      +31     
==========================================
+ Hits         3904     3934      +30     
- Misses        359      360       +1     
Flag Coverage Δ
cli_func_v4 81.50% <65.21%> (-0.06%) ⬇️
py_func_v4 80.71% <95.65%> (+0.14%) ⬆️
unit 83.27% <65.21%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
gitlab/mixins.py 91.31% <95.00%> (+0.19%) ⬆️
gitlab/exceptions.py 99.29% <100.00%> (+0.01%) ⬆️
gitlab/v4/objects/labels.py 93.47% <100.00%> (ø)
gitlab/v4/objects/personal_access_tokens.py 100.00% <0.00%> (ø)
gitlab/v4/objects/users.py 98.40% <0.00%> (+0.01%) ⬆️

@JohnVillalovos

Copy link
Copy Markdown
Member

Thanks for this. This is going to need some docs updates too, so that people know it is there and also how to use it.

@StingRayZA

Copy link
Copy Markdown
Contributor Author

Sure - will add them now the CI has given the code a 👍

@StingRayZA

Copy link
Copy Markdown
Contributor Author

I've removed the CLI action (It wasn't testing well, and I don't think I know how to make it work without breaking backwards compatibility)

Also added a note into the docs...

@nejch nejch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @StingRayZA! I just had a few questions.

I'm unsure if /promote is an endpoint that will appear elsewhere and warrant its own Mixin, but it looks clean this way :)

Comment thread gitlab/mixins.py
Comment thread gitlab/mixins.py Outdated
Comment thread tests/functional/conftest.py Outdated
Comment thread tests/functional/conftest.py Outdated
Comment thread tests/functional/api/test_projects.py Outdated
Comment thread tests/functional/api/test_projects.py Outdated
@StingRayZA

Copy link
Copy Markdown
Contributor Author

Thanks for the review @nejch - I've got a tweak or two to make and I'll post them ASAP...

@StingRayZA
StingRayZA requested a review from nejch October 11, 2021 13:26
@nejch nejch assigned nejch and unassigned StingRayZA Oct 14, 2021
Comment thread gitlab/mixins.py
Comment thread tests/functional/api/test_projects.py Outdated
@nejch nejch assigned StingRayZA and unassigned nejch Oct 17, 2021
@nejch

nejch commented Oct 17, 2021

Copy link
Copy Markdown
Member

Thanks again @StingRayZA. Just a nitpick for tests and if you could maybe rebase on top of main? :)

Adds a mixin that allows the /promote endpoint to be called.

Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
@StingRayZA

Copy link
Copy Markdown
Contributor Author

All done @nejch - updated and rebased 😁

@StingRayZA
StingRayZA requested a review from nejch October 18, 2021 09:34
@nejch
nejch merged commit 853d850 into python-gitlab:main Oct 20, 2021
@nejch

nejch commented Oct 20, 2021

Copy link
Copy Markdown
Member

Thanks for the contribution @StingRayZA! :) Looking forward to the milestone PR 😁

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.

Feature Request: Support promoting project labels

4 participants