Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

#1259 Add GroupPushRules and GroupPushRulesManager classes#1266

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

Merged
nejch merged 1 commit intopython-gitlab:mainfromgokeefe:gokeefe/group_push_rules
Jul 5, 2022
Merged

#1259 Add GroupPushRules and GroupPushRulesManager classes#1266

nejch merged 1 commit intopython-gitlab:mainfromgokeefe:gokeefe/group_push_rules
Jul 5, 2022

Conversation

gokeefe
Copy link
Contributor

@gokeefegokeefe commentedJan 13, 2021
edited by nejch
Loading

Add classes to read and update push rules on groups

Closes#1259.

Copy link
Member

@nejchnejch left a 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 ingitlab/tests/objects. You can look at some existing examples athttps://github.com/python-gitlab/python-gitlab/tree/master/gitlab/tests/objects, and use the example responses athttps://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.

@gokeefe
Copy link
ContributorAuthor

Thanks for this@gokeefe! Just added a small comment. Do you have a link for the upstream issue with the missing response?

Yes, right here:https://gitlab.com/gitlab-org/gitlab/-/issues/297559

I rebased your branch on top of master as we switched CI systems recently and this should give you better build results.

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!

@nejch
Copy link
Member

Thanks for this@gokeefe! Just added a small comment. Do you have a link for the upstream issue with the missing response?

Yes, right here:https://gitlab.com/gitlab-org/gitlab/-/issues/297559

I rebased your branch on top of master as we switched CI systems recently and this should give you better build results.

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 intogitlab/v4/objects/push_rules.py and the manager also imported ingroups.py. Take a look at#1304 for an example on how to add it.

I'll assign this to you for now but if you need help just let me know :)

@nejch
Copy link
Member

nejch commentedMay 7, 2022
edited
Loading

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!

@JohnVillalovosJohnVillalovos marked this pull request as ready for reviewJuly 4, 2022 15:59
@JohnVillalovos
Copy link
Member

JohnVillalovos commentedJul 4, 2022
edited
Loading

@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
Copy link
Member

@nejchnejch left a 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)::
Copy link
Member

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)

Suggested change
Get group push rules (returns None is there are no push rules)::
Get group push rules (returns``None`` if there are no push rules)::

@nejchnejch merged commit768890a intopython-gitlab:mainJul 5, 2022
@gokeefegokeefe deleted the gokeefe/group_push_rules branchSeptember 17, 2022 04:01
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch approved these changes

Assignees

@gokeefegokeefe

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Manage push rules on a group
3 participants
@gokeefe@nejch@JohnVillalovos

[8]ページ先頭

©2009-2025 Movatter.jp