FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/docs/gl_objects/notifications.py at master · matejzero/python-gitlab · GitHub
matejzero
python-gitlab
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
docs
/
gl_objects
/
notifications.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (19 loc) · 578 Bytes
Breadcrumbs
python-gitlab
/
docs
/
gl_objects
/
notifications.py
Copy path
File metadata and controls
21 lines (19 loc) · 578 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
# get
# global settings
settings
=
gl
.
notificationsettings
.
get
()
# for a group
settings
=
gl
.
groups
.
get
(
group_id
).
notificationsettings
.
get
()
# for a project
settings
=
gl
.
projects
.
get
(
project_id
).
notificationsettings
.
get
()
# end get
# update
# use a predefined level
settings
.
level
=
gitlab
.
NOTIFICATION_LEVEL_WATCH
# create a custom setup
settings
.
level
=
gitlab
.
NOTIFICATION_LEVEL_CUSTOM
settings
.
save
()
# will create additional attributes, but not mandatory
settings
.
new_merge_request
=
True
settings
.
new_issue
=
True
settings
.
new_note
=
True
settings
.
save
()
# end update
Back
|
FazBrowse Home
|
New Git URL