/
signals.py
214 lines (187 loc) · 6.44 KB
/
signals.py
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
"""Signals related to review requests, reviews, and replies."""
from django.dispatch import Signal
#: Emitted when a review request is publishing.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user publishing the review request.
#:
#: review_request_draft (reviewboard.reviews.models.ReviewRequestDraft):
#: The review request draft being published.
review_request_publishing = Signal()
#: Emitted when a review request is published.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who published the review request.
#:
#: review_request (reviewboard.reviews.models.ReviewRequest):
#: The review request that was published.
#:
#: trivial (bool):
# Whether or not the review request was published trivially or not.
#:
#: changedesc (reviewboard.changedescs.models.ChangeDescription):
#: The change description associated with the publish, if any.
review_request_published = Signal()
#: Emitted when a review request is about to be closed.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user closing the review request.
#:
#: review_request (reviewboard.reviews.models.ReviewRequest):
#: The review request being closed.
#:
#: close_type (unicode):
#: Describes how the review request is being closed. It is one of
#: :py:data:`~reviewboard.reviews.models.ReviewRequest.SUBMITTED` or
#: :py:data:`~reviewboard.reviews.models.ReviewRequest.DISCARDED`.
#:
#: description (unicode):
#: The provided closing description.
#:
#: rich_text (bool):
#: Whether or not the description is rich text (Markdown).
review_request_closing = Signal()
#: Emitted when a review request has been closed.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who closed the review request.
#:
#: review_request (reviewboard.reviews.models.ReviewRequest):
#: The review request that was closed.
#:
#: close_type (unicode):
#: Describes how the review request was closed. It is one of
#: :py:data:`~reviewboard.reviews.models.ReviewRequest.SUBMITTED` or
#: :py:data:`~reviewboard.reviews.models.ReviewRequest.DISCARDED`.
#:
#: description (unicode):
#: The provided closing description.
#:
#: rich_text (bool):
#: Whether or not the description is rich text (Markdown).
review_request_closed = Signal()
#: Emitted when a review request is about to be reopened.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user re-opening the review request.
#:
#: review_request (reviewboard.reviews.models.ReviewRequest):
#: The review request being reopened.
review_request_reopening = Signal()
#: Emitted when a review request has been reopened.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who re-opened the review request.
#:
#: review_request (reviewboard.reviews.models.ReviewRequest):
#: The review request that was reopened.
#:
#: old_status (unicode):
#: The old status for the review request. This will be
#: :py:attr:`~reviewboard.reviews.models.ReviewRequest.PENDING_REVIEW`,
#: :py:attr:`~reviewboard.reviews.models.ReviewRequest.SUBMITTED`, or
#: :py:attr:`~reviewboard.reviews.models.ReviewRequest.DISCARDED`.
#:
#: old_public (bool):
#: The old public state for the review request.
review_request_reopened = Signal()
#: Emitted when a review is being published.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user publishing the review.
#:
#: review (reviewboard.reviews.models.Review):
#: The review that's being published.
#:
#: to_owner_only (bool):
#: Whether the review e-mail should be sent only to the review request
#: submitter.
review_publishing = Signal()
#: Emitted when a Ship It is about to be revoked from a review.
#:
#: Listeners can raise a
#: :py:exc:`~reviewboard.reviews.errors.RevokeShipItError` to stop the Ship It
#: from being revoking.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who requested to revoke the Ship It.
#:
#: review (reviewboard.reviews.models.review.Review):
#: The review that will have its Ship It revoked.
review_ship_it_revoking = Signal()
#: Emitted when a Ship It has been revoked from a review.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who revoked the Ship It.
#:
#: review (reviewboard.reviews.models.review.Review):
#: The review that had its Ship It revoked.
review_ship_it_revoked = Signal()
#: Emitted when a review has been published.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who published the review.
#:
#: review (reviewboard.reviews.models.Review):
#: The review that was published.
#:
#: to_owner_only (bool):
#: Whether the review e-mail should be sent only to the review request
#: submitter.
#:
#: trivial (bool):
#: Whether to skip e-mail notifications entirely.
#:
#: request (django.http.HttpRequest):
#: The request object if the review was published from an HTTP request.
review_published = Signal()
#: Emitted when a reply to a review is being published.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user publishing the reply.
#:
#: review (reviewboard.reviews.models.Review):
#: The reply that's being published.
reply_publishing = Signal()
#: Emitted when a reply to a review has ben published.
#:
#: Args:
#: user (django.contrib.auth.models.User):
#: The user who published the reply.
#:
#: review (reviewboard.reviews.models.Review):
#: The reply that was published.
#:
#: trivial (bool):
#: Whether the reply was considered trivial.
reply_published = Signal()
#: Emitted when a StatusUpdate should run or re-run.
#:
#: Version Changed:
#: 5.0.3:
#: Added the ``config`` argument.
#:
#: Args:
#: status_update (reviewboard.reviews.models.StatusUpdate):
#: The StatusUpdate associated with the tool that should be run.
#:
#: config (reviewboard.integrations.models.IntegrationConfig):
#: The associated integration configuration being run.
#:
#: If provided and set, this should be used instead of scanning for
#: a matching configuration.
#:
#: Version Added:
#: 5.0.3
status_update_request_run = Signal()