FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/docs/gl_objects/branches.py at master · mohsenSy/python-gitlab · GitHub
mohsenSy
python-gitlab
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
docs
/
gl_objects
/
branches.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 742 Bytes
Breadcrumbs
python-gitlab
/
docs
/
gl_objects
/
branches.py
Copy path
File metadata and controls
33 lines (29 loc) · 742 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# list
branches
=
gl
.
project_branches
.
list
(
project_id
=
1
)
# or
branches
=
project
.
branches
.
list
()
# end list
# get
branch
=
gl
.
project_branches
.
get
(
project_id
=
1
,
id
=
'master'
)
# or
branch
=
project
.
branches
.
get
(
'master'
)
# end get
# create
branch
=
gl
.
project_branches
.
create
({
'branch_name'
:
'feature1'
,
'ref'
:
'master'
},
project_id
=
1
)
# or
branch
=
project
.
branches
.
create
({
'branch_name'
:
'feature1'
,
'ref'
:
'master'
})
# end create
# delete
gl
.
project_branches
.
delete
(
project_id
=
1
,
id
=
'feature1'
)
# or
project
.
branches
.
delete
(
'feature1'
)
# or
branch
.
delete
()
# end delete
# protect
branch
.
protect
()
branch
.
unprotect
()
# end protect
Back
|
FazBrowse Home
|
New Git URL