-
Notifications
You must be signed in to change notification settings - Fork 643
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1259 Add GroupPushRules and GroupPushRulesManager classes #1266
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 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
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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.