Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
d676771a
Unverified
Commit
d676771a
authored
1 year ago
by
Sandeep Chauhan
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add slack notification for reviewers on review submit by the role reviewers (#3433)
Fixes #3421
parent
3c2d15c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!23
Add ReviewOpinion delete functionality to review sidebar (#3565)
,
!20
Merge in v4.7.0 and v4.8.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hypha/apply/activity/adapters/slack.py
+6
-9
6 additions, 9 deletions
hypha/apply/activity/adapters/slack.py
with
6 additions
and
9 deletions
hypha/apply/activity/adapters/slack.py
+
6
−
9
View file @
d676771a
...
...
@@ -174,16 +174,13 @@ class SlackAdapter(AdapterBase):
recipients
=
[
self
.
slack_id
(
source
.
lead
)]
# Notify second reviewer when first reviewer is done.
if
message_type
==
MESSAGES
.
NEW_REVIEW
and
related
:
if
message_type
in
[
MESSAGES
.
NEW_REVIEW
,
MESSAGES
.
REVIEW_OPINION
]
and
related
:
submission
=
source
if
(
submission
.
assigned
.
with_roles
().
count
()
==
2
and
related
.
author
.
reviewer
==
submission
.
assigned
.
with_roles
().
first
().
reviewer
):
recipients
.
append
(
self
.
slack_id
(
submission
.
assigned
.
with_roles
().
last
().
reviewer
)
)
role_reviewers
=
[
role_reviewer
.
reviewer
for
role_reviewer
in
submission
.
assigned
.
with_roles
()]
if
related
.
author
.
reviewer
in
role_reviewers
:
for
reviewer
in
role_reviewers
:
if
reviewer
!=
related
.
author
.
reviewer
:
recipients
.
append
(
self
.
slack_id
(
reviewer
))
if
message_type
==
MESSAGES
.
UPDATE_INVOICE_STATUS
:
if
related
.
status
in
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment