Skip to content

Conversation

@kernelport
Copy link
Contributor

@kernelport kernelport commented Apr 22, 2020

Make it possible to update subpages in wikis

Update SaveMixin to use utils._url_encode() on the ID if it is a
string.

Closes: #1079

@max-wittig
Copy link
Member

Hi @kernelport Sorry for the delay! Would you mind to add a quick unit test for this and use conventional changelog for the commit message

@JohnVillalovos JohnVillalovos changed the title make it possible to update subpages in wikis fix: allow updating of sub-pages in wikis Jan 9, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2022

Codecov Report

Merging #1080 (535636f) into main (ac81272) will increase coverage by 0.00%.
The diff coverage is 80.00%.

@@           Coverage Diff           @@
##             main    #1080   +/-   ##
=======================================
  Coverage   92.10%   92.11%           
=======================================
  Files          76       76           
  Lines        4801     4804    +3     
=======================================
+ Hits         4422     4425    +3     
  Misses        379      379           
Flag Coverage Δ
cli_func_v4 81.30% <20.00%> (-0.06%) ⬇️
py_func_v4 80.18% <80.00%> (+0.01%) ⬆️
unit 83.05% <80.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
gitlab/mixins.py 91.60% <80.00%> (+0.06%) ⬆️

Make it possible to update subpages in wikis

Update SaveMixin to use utils._url_encode() on the ID if it is a
string.

Closes: python-gitlab#1079
@JohnVillalovos
Copy link
Member

So I'm not sure if this is the way to go. I was thinking maybe we should add a get_url_encoded_id method around here: https://github.com/python-gitlab/python-gitlab/blob/main/gitlab/base.py#L205-L209

@JohnVillalovos
Copy link
Member

Closing this as done by #1819

@nejch
Copy link
Member

nejch commented Jan 13, 2022

@JohnVillalovos I think there might be parts of this that are useful for other issues, see #1081. Notably returning the save results so that moved subpages can be edited. But agreed, the url-encoding is finished.

@JohnVillalovos
Copy link
Member

I'll work on a new PR to return the dictionary from save()

@JohnVillalovos
Copy link
Member

I created #1832 for the save() result.

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.

project.wikis.create with subpages results in 404 Wiki Page Not Found

5 participants