- Notifications
You must be signed in to change notification settings - Fork673
fix: removeproject.approvals.set_approvals()
method#2333
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks@JohnVillalovos - was gonna get to this myself but you beat me to it 😅
I think we can now also remove/modify this part and potentially start testing approvals in functional tests:
python-gitlab/tests/functional/api/test_merge_requests.py
Lines 132 to 134 indd04e8e
project.approvals.set_approvers([1], []) | |
approval=project.approvals.get() | |
assertapproval.approvers[0]["user"]["id"]==1 |
However, our project-level approval managers/objects are missing some mixing potentially.
Otherwise I just had some notes on the difference no project/MR-level approvals.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
99d27fe
to1a5b47c
Compare
I agree we should get the tests working. But I just wanted to remove the non-working endpoint at this stage. Getting the tests working is a separate issue and MR in my mind. |
Ok, makes sense. the xfail is a good indicator anyway that there's something wrong with the code and we should fix it at some point. Could we maybe do a |
1a5b47c
to431ae7f
Compareset_approvals()
methodproject.approvals.set_approvals()
methodThe `project.approvals.set_approvals()` method used the`/projects/:id/approvers` end point. That end point was removed fromGitLab in the 13.11 release, on 2-Apr-2021 in commit27dc2f2fe81249bbdc25f7bd8fe799752aac05e6 via merge commite482597a8cf1bae8e27abd6774b684fb90491835. It was deprecated on19-Aug-2019.See merge request:https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57473
431ae7f
to91f08f0
CompareJohnVillalovos commentedOct 19, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Done! 🙂 Good idea! |
The `not-callable` error started showing up. Ignore this error asit is invalid. Also `mypy` tests for these issues.Closes:#2334
Uh oh!
There was an error while loading.Please reload this page.
The
project.approvals.set_approvals()
method used the/projects/:id/approvers
end point. That end point was removed fromGitLab in the 13.11 release, on 2-Apr-2021 in commit
27dc2f2fe81249bbdc25f7bd8fe799752aac05e6 via merge commit
e482597a8cf1bae8e27abd6774b684fb90491835. It was deprecated on
19-Aug-2019.
See merge request:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57473