X Tutup
Skip to content

feat(objects): add support for generic packages API#1460

Merged
JohnVillalovos merged 2 commits intomasterfrom
feat/generic-packages
Jun 1, 2021
Merged

feat(objects): add support for generic packages API#1460
JohnVillalovos merged 2 commits intomasterfrom
feat/generic-packages

Conversation

@nejch
Copy link
Member

@nejch nejch commented May 16, 2021

Closes #1389.

I had to add a raw param to put/post like we have for get, instead of using files with the multipart encoder, to really ensure only the raw data ended up as the uploaded package 🤔

Maybe it's just how files are handled currently and can still be refactored to take out redundant stuff if we want a raw upload. In the meantime I also cleaned out some code from http_request into a helper method and centralized the content_types there (http_request would be getting quite long and messy otherwise).

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2021

Codecov Report

Merging #1460 (64e8d57) into master (fb7174e) will increase coverage by 0.08%.
The diff coverage is 91.30%.

@@            Coverage Diff             @@
##           master    #1460      +/-   ##
==========================================
+ Coverage   90.92%   91.01%   +0.08%     
==========================================
  Files          73       73              
  Lines        4056     4107      +51     
==========================================
+ Hits         3688     3738      +50     
- Misses        368      369       +1     
Flag Coverage Δ
cli_func_v4 80.71% <89.13%> (+0.21%) ⬆️
py_func_v4 80.05% <91.30%> (+0.20%) ⬆️
unit 82.20% <91.30%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
gitlab/client.py 86.60% <87.50%> (-0.04%) ⬇️
gitlab/v4/objects/packages.py 96.15% <93.10%> (-3.85%) ⬇️
gitlab/v4/objects/projects.py 83.48% <100.00%> (ø)
gitlab/v4/objects/statistics.py 100.00% <0.00%> (ø)
gitlab/v4/objects/deployments.py 100.00% <0.00%> (ø)
gitlab/v4/cli.py 81.56% <0.00%> (+0.39%) ⬆️
gitlab/v4/objects/merge_requests.py 82.75% <0.00%> (+0.77%) ⬆️
gitlab/v4/objects/groups.py 83.50% <0.00%> (+1.08%) ⬆️

@nejch nejch requested a review from JohnVillalovos May 25, 2021 20:54
@nejch nejch force-pushed the feat/generic-packages branch from 0af668f to fadc681 Compare May 29, 2021 22:07
@nejch nejch force-pushed the feat/generic-packages branch from fadc681 to 9b4cc2c Compare May 30, 2021 04:09
Co-authored-by: John Villalovos <john@sodarock.com>
@nejch nejch force-pushed the feat/generic-packages branch from 0c271b7 to 64e8d57 Compare May 31, 2021 22:40
Copy link
Member Author

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Thanks! :) I've applied all the typing suggestions, for enforcing keyword arguments we can maybe discuss separately

@nejch nejch requested a review from JohnVillalovos May 31, 2021 22:50
Copy link
Member

@JohnVillalovos JohnVillalovos left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@JohnVillalovos JohnVillalovos merged commit a11623b into master Jun 1, 2021
@JohnVillalovos JohnVillalovos deleted the feat/generic-packages branch June 1, 2021 03:43
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.

RFE: Add support to upload generic package

3 participants

X Tutup