#1259 Add GroupPushRules and GroupPushRulesManager classes#1266
#1259 Add GroupPushRules and GroupPushRulesManager classes#1266nejch merged 1 commit intopython-gitlab:mainfrom gokeefe:gokeefe/group_push_rules
Conversation
nejch
left a comment
There was a problem hiding this comment.
Thanks for this @gokeefe! Just added a small comment. Do you have a link for the upstream issue with the missing response?
We can't really run integration tests at the moment on EE features but if you want to give it a shot you can add some unit tests for this in gitlab/tests/objects. You can look at some existing examples at https://github.com/python-gitlab/python-gitlab/tree/master/gitlab/tests/objects, and use the example responses at https://docs.gitlab.com/ce/api/groups.html#push-rules for mocks.
I rebased your branch on top of master as we switched CI systems recently and this should give you better build results.
Yes, right here: https://gitlab.com/gitlab-org/gitlab/-/issues/297559
Awesome, the travis-ci build failed and I had no idea why because the same tests were working fine locally. I'll have a look at the rest next week. Thanks! |
Just FYI - we've split the objects package into modules now so this will have to be rebased and moved into I'll assign this to you for now but if you need help just let me know :) |
|
Hi @gokeefe are you still interested in finishing this? I think we're ok without pytest and I can add them later if you're not comfortable doing that. This just needs a rebase to resolve some conflicts and maybe squash into a single commit. Let me know! |
|
@nejch I rebased this PR, then squashed it down to one commit and cleaned things up a little bit. If you have time to review I can work on it some more if needed. |
Add the GroupPushRules and GroupPushRulesManager classes. Closes: #1259
nejch
left a comment
There was a problem hiding this comment.
Thanks a lot @gokeefe for the PR and @JohnVillalovos for bringing this up to date! :)
|
|
||
| group.pushrules.create({'deny_delete_tag': True}) | ||
|
|
||
| Get group push rules (returns None is there are no push rules):: |
There was a problem hiding this comment.
(Edit: ah I realize this is also wrong in the project docs, nvm)
| Get group push rules (returns None is there are no push rules):: | |
| Get group push rules (returns ``None`` if there are no push rules):: |
Add classes to read and update push rules on groups
Closes #1259.