Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Infrastructure
sysadmin-bin
Commits
99bac9f4
Commit
99bac9f4
authored
Nov 06, 2022
by
Andrea Veri
Browse files
Fix up dict keys to match what the API wants
parent
3bf74877
Changes
1
Hide whitespace changes
Inline
Side-by-side
gitlab/gitlab-operations.py
View file @
99bac9f4
...
...
@@ -95,15 +95,15 @@ for project in gnome_projects:
if
default_branch
not
in
protected_branches
:
proj
.
protectedbranches
.
create
({
'name'
:
default_branch
,
'
allowed_to_push
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
,
'
allowed_to_merge
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
'
merge_access_level
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
,
'
push_access_level
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
})
if
len
(
stable_branches
)
>
0
and
'gnome-*'
not
in
protected_branches
:
proj
.
protectedbranches
.
create
({
'name'
:
'gnome-*'
,
'
allowed_to_push
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
,
'
allowed_to_merge
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
'
merge_access_level
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
,
'
push_access_level
'
:
gitlab
.
const
.
AccessLevel
.
DEVELOPER
})
except
gitlab
.
exceptions
.
GitlabListError
as
e
:
# Some projects are not used for git hosting
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment