-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3988656
commit 8249ff6
Showing
4 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# Repository Configuration | ||
TODO add docs for dev_notifications | ||
|
||
A repository configuration file specifies how notifications should be handled for a given repository. It should be at the root of your | ||
monorepo in the main branch. The bot will look for a `.monorobot.json` file by default, but you can change this behavior with the `--config` flag. | ||
|
@@ -23,6 +22,15 @@ Refer [here](https://docs.github.com/en/free-pro-team@latest/developers/webhooks | |
"[email protected]": "[email protected]", | ||
"gh-handle": "[email protected]" | ||
}, | ||
"notifications_configs": { | ||
"dm_for_failing_build": { | ||
"[email protected]": false, | ||
"[email protected]": false | ||
}, | ||
"dm_after_failed_build": { | ||
"[email protected]": true | ||
} | ||
}, | ||
"prefix_rules": { | ||
... | ||
}, | ||
|
@@ -47,8 +55,11 @@ Refer [here](https://docs.github.com/en/free-pro-team@latest/developers/webhooks | |
| `project_owners` | project owners config object | no project owners are defined | | ||
| `ignored_users` | list of users to be ignored on all notifications | no user is ignored | | ||
| `user_mappings` | list of mappings from git email and/or GitHub handle to Slack email | no mapping defined | ||
| `notifications_configs` | list of configs for certain types of notifications | dm_for_failing_build defaults to true and dm_after_failed_build to false | ||
|
||
Note that `notifications_configs` expects to match against the email used in slack. It will respect the `user_mappings` rules and then use the resulting slack email to find the correct user id and @mention. If you are not using the `user_mappings` feature, you can directly use the slack email in the `notifications_configs` field. | ||
|
||
Note that in `user_mappings`, git email to Slack email mappings are used for status DMs, while GitHub handle to Slack email mappings are used to get Slack mentions in comment notifications. | ||
Also note that in `user_mappings`, git email to Slack email mappings are used for status DMs, while GitHub handle to Slack email mappings are used to get Slack mentions in comment notifications. | ||
|
||
The reason for these two separate Slack email matching schemes is that in the case of commits, the git email is available in the GitHub payload and can be used to directly match with Slack emails for status DMs (`user_mappings` can be used to manually override if there is a known mismatch between git email and Slack email). However, for actions done on GitHub itself (e.g. opening PRs, commenting, etc.), usually the only thing available is the GitHub username. To get the email in these cases, a user will have to go to settings and set their email to public, which is (1) hard to enforce if there are many working on the monorepo, and (2) might be undesirable for privacy reasons. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters