FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/gitlab/v4/objects/discussions.py at main · stdexception/python-gitlab · GitHub
stdexception
python-gitlab
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
gitlab
/
v4
/
objects
/
discussions.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
94 lines (71 loc) · 3.38 KB
Breadcrumbs
python-gitlab
/
gitlab
/
v4
/
objects
/
discussions.py
Copy path
File metadata and controls
94 lines (71 loc) · 3.38 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
from
typing
import
Any
,
cast
,
Union
from
gitlab
.
base
import
RESTManager
,
RESTObject
from
gitlab
.
mixins
import
CreateMixin
,
RetrieveMixin
,
SaveMixin
,
UpdateMixin
from
gitlab
.
types
import
RequiredOptional
from
.
notes
import
(
# noqa: F401
ProjectCommitDiscussionNoteManager
,
ProjectIssueDiscussionNoteManager
,
ProjectMergeRequestDiscussionNoteManager
,
ProjectSnippetDiscussionNoteManager
,
)
__all__
=
[
"ProjectCommitDiscussion"
,
"ProjectCommitDiscussionManager"
,
"ProjectIssueDiscussion"
,
"ProjectIssueDiscussionManager"
,
"ProjectMergeRequestDiscussion"
,
"ProjectMergeRequestDiscussionManager"
,
"ProjectSnippetDiscussion"
,
"ProjectSnippetDiscussionManager"
,
]
class
ProjectCommitDiscussion
(
RESTObject
):
notes
:
ProjectCommitDiscussionNoteManager
class
ProjectCommitDiscussionManager
(
RetrieveMixin
,
CreateMixin
,
RESTManager
):
_path
=
"/projects/{project_id}/repository/commits/{commit_id}/discussions"
_obj_cls
=
ProjectCommitDiscussion
_from_parent_attrs
=
{
"project_id"
:
"project_id"
,
"commit_id"
:
"id"
}
_create_attrs
=
RequiredOptional
(
required
=
(
"body"
,),
optional
=
(
"created_at"
,))
def
get
(
self
,
id
:
Union
[
str
,
int
],
lazy
:
bool
=
False
,
**
kwargs
:
Any
)
->
ProjectCommitDiscussion
:
return
cast
(
ProjectCommitDiscussion
,
super
().
get
(
id
=
id
,
lazy
=
lazy
,
**
kwargs
))
class
ProjectIssueDiscussion
(
RESTObject
):
notes
:
ProjectIssueDiscussionNoteManager
class
ProjectIssueDiscussionManager
(
RetrieveMixin
,
CreateMixin
,
RESTManager
):
_path
=
"/projects/{project_id}/issues/{issue_iid}/discussions"
_obj_cls
=
ProjectIssueDiscussion
_from_parent_attrs
=
{
"project_id"
:
"project_id"
,
"issue_iid"
:
"iid"
}
_create_attrs
=
RequiredOptional
(
required
=
(
"body"
,),
optional
=
(
"created_at"
,))
def
get
(
self
,
id
:
Union
[
str
,
int
],
lazy
:
bool
=
False
,
**
kwargs
:
Any
)
->
ProjectIssueDiscussion
:
return
cast
(
ProjectIssueDiscussion
,
super
().
get
(
id
=
id
,
lazy
=
lazy
,
**
kwargs
))
class
ProjectMergeRequestDiscussion
(
SaveMixin
,
RESTObject
):
notes
:
ProjectMergeRequestDiscussionNoteManager
class
ProjectMergeRequestDiscussionManager
(
RetrieveMixin
,
CreateMixin
,
UpdateMixin
,
RESTManager
):
_path
=
"/projects/{project_id}/merge_requests/{mr_iid}/discussions"
_obj_cls
=
ProjectMergeRequestDiscussion
_from_parent_attrs
=
{
"project_id"
:
"project_id"
,
"mr_iid"
:
"iid"
}
_create_attrs
=
RequiredOptional
(
required
=
(
"body"
,),
optional
=
(
"created_at"
,
"position"
)
)
_update_attrs
=
RequiredOptional
(
required
=
(
"resolved"
,))
def
get
(
self
,
id
:
Union
[
str
,
int
],
lazy
:
bool
=
False
,
**
kwargs
:
Any
)
->
ProjectMergeRequestDiscussion
:
return
cast
(
ProjectMergeRequestDiscussion
,
super
().
get
(
id
=
id
,
lazy
=
lazy
,
**
kwargs
)
)
class
ProjectSnippetDiscussion
(
RESTObject
):
notes
:
ProjectSnippetDiscussionNoteManager
class
ProjectSnippetDiscussionManager
(
RetrieveMixin
,
CreateMixin
,
RESTManager
):
_path
=
"/projects/{project_id}/snippets/{snippet_id}/discussions"
_obj_cls
=
ProjectSnippetDiscussion
_from_parent_attrs
=
{
"project_id"
:
"project_id"
,
"snippet_id"
:
"id"
}
_create_attrs
=
RequiredOptional
(
required
=
(
"body"
,),
optional
=
(
"created_at"
,))
def
get
(
self
,
id
:
Union
[
str
,
int
],
lazy
:
bool
=
False
,
**
kwargs
:
Any
)
->
ProjectSnippetDiscussion
:
return
cast
(
ProjectSnippetDiscussion
,
super
().
get
(
id
=
id
,
lazy
=
lazy
,
**
kwargs
))
Back
|
FazBrowse Home
|
New Git URL