Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
95323031
Commit
95323031
authored
Oct 29, 2021
by
Eric Rosenberg
Committed by
Marcin Sedlak-Jakubowski
Oct 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add troubleshooting step for custom notifications
parent
2eb2f975
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
doc/user/profile/notifications.md
doc/user/profile/notifications.md
+16
-0
No files found.
doc/user/profile/notifications.md
View file @
95323031
...
...
@@ -353,3 +353,19 @@ For example, an alert notification email can have one of
Expanding the list of events included in the
`X-GitLab-NotificationReason`
header is tracked in
[
issue 20689
](
https://gitlab.com/gitlab-org/gitlab/-/issues/20689
)
.
## Troubleshooting
### Pull a list of recipients for notifications
If you want to pull a list of recipients to receive notifications from a project
(mainly used for troubleshooting custom notifications),
in a Rails console, run
`sudo gitlab-rails c`
and be sure to update the project name:
```
plaintext
project = Project.find_by_full_path '<project_name>'
merge_request = project.merge_requests.find_by(iid: 1)
current_user = User.first
recipients = NotificationRecipients::BuildService.build_recipients(merge_request, current_user, action: "push_to"); recipients.count
recipients.each { |notify| puts notify.user.username }
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment