- Notifications
You must be signed in to change notification settings - Fork673
feat: add protectedbranches to group class (#3164)#3170
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
feat: add protectedbranches to group class (#3164)#3170
Uh oh!
There was an error while loading.Please reload this page.
Conversation
d13b0ff
to5f03160
Comparecodecovbot commentedApr 11, 2025 • 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #3170 +/- ##======================================= Coverage 97.32% 97.32% ======================================= Files 98 98 Lines 6046 6056 +10 =======================================+ Hits 5884 5894 +10 Misses 162 162
Flags with carried forward coverage won't be shown.Click here to find out more.
🚀 New features to boost your workflow:
|
JohnVillalovos commentedApr 17, 2025 • 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.
FYI: This will need to be rebased and the conflicts resolved. |
Rebased@JohnVillalovos ready for a squash & merge ✅ |
|
c5bfc06
tob46f370
Compare@JohnVillalovos ...hmm GitHub is ... different 😁 Anyways.. should be fixed.. ![]() ![]() |
b46f370
to66430ea
CompareThere 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.
Pull Request Overview
This PR adds support for managing protected branches in group objects by introducing the new attribute "protectedbranches" and the corresponding manager classes and tests.
- Implements the new "protectedbranches" attribute in the Group class.
- Introduces the GroupProtectedBranch and GroupProtectedBranchManager classes to handle CRUD operations.
- Adds functional tests and documentation updates for the new functionality.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/functional/api/test_groups.py | Added functional tests for group protected branches. |
gitlab/v4/objects/groups.py | Added the "protectedbranches" attribute to the Group class. |
gitlab/v4/objects/branches.py | Introduced GroupProtectedBranch and Manager classes. |
docs/gl_objects/protected_branches.rst | Updated documentation to include group protected branches. |
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.
LGTM
Thanks@xakepnz
bfd31a8
intopython-gitlab:mainUh 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.
Changes
protectedbranches
attr to theGroup class objects. This allows one to retrieve (.list()
) or set (.create()
) protected branches to trickle downstream to sub-groups/projects.Documentation and testing
Please consider whether this PR needs documentation and tests.This is not required, but highly appreciated:
Closes#3164