You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/secret_docs.md
+27-22Lines changed: 27 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,41 +8,28 @@ A secrets file stores sensitive information. Unlike the repository configuration
8
8
9
9
```json
10
10
{
11
-
"gh_token": "",
12
-
"slack_access_token": ""
11
+
"repos": [
12
+
{
13
+
"url": "https://github.com/ahrefs/monorobot",
14
+
"gh_token": "XXX"
15
+
}
16
+
],
17
+
"slack_access_token": "XXX"
13
18
}
14
19
```
15
20
16
21
| value | description | optional | default |
17
22
|-|-|-|-|
18
-
|`gh_token`| specify to grant the bot access to private repositories; omit for public repositories | Yes | - |
19
-
|`gh_hook_token`| specify to ensure the bot only receives GitHub notifications from pre-approved repositories | Yes | - |
20
-
|`repos`| specify to use Monorobot in multiple repositories (with support for overriding secrets) | Yes | - |
23
+
|`repos`| specify each target repository's url and its secrets | No | - |
21
24
|`slack_access_token`| slack bot access token to enable message posting to the workspace | Yes | try to use webhooks defined in `slack_hooks` instead |
22
25
|`slack_hooks`| list of channel names and their corresponding webhook endpoint | Yes | try to use token defined in `slack_access_token` instead |
Note that either `slack_access_token` or `slack_hooks` must be defined. If both are present, the bot will send notifications using webhooks.
26
29
27
-
## `gh_token`
28
-
29
-
Some operations, such as fetching a config file from a private repository, or the commit corresponding to a commit comment event, require a personal access token. Refer [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for detailed instructions on token generation.
30
-
31
-
*See `repos` if you need to support multiple repositories that use different tokens.*
32
-
33
-
## `gh_hook_token`
34
-
35
-
Refer [here](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/securing-your-webhooks) for more information on securing webhooks with a token.
36
-
37
-
*See `repos` if you need to support multiple repositories that use different tokens.*
38
-
39
30
## `repos`
40
31
41
-
Specifies which repositories to accept events from, along with any repository-specific overrides to secrets. If omitted, assumes all notifications come from a single repository and accepts all events.
42
-
43
-
Secrets defined here take precedence over those defined at the top level of the secrets file.
44
-
45
-
Repository URLs should be fully qualified (include the protocol), with no trailing backslash.
32
+
Specifies which repositories to accept events from, along with any repository-specific overrides to secrets.
46
33
47
34
```json
48
35
[
@@ -58,6 +45,24 @@ Repository URLs should be fully qualified (include the protocol), with no traili
58
45
]
59
46
```
60
47
48
+
| value | description | optional | default |
49
+
|-|-|-|-|
50
+
|`url`| the repository url. | No | - |
51
+
|`gh_token`| specify to grant the bot access to private repositories; omit for public repositories | Yes | - |
52
+
|`gh_hook_token`| specify to ensure the bot only receives GitHub notifications from pre-approved repositories | Yes | - |
53
+
54
+
### `repos`
55
+
56
+
Repository URLs should be fully qualified (include the protocol), with no trailing backslash.
57
+
58
+
### `gh_token`
59
+
60
+
Some operations, such as fetching a config file from a private repository, or the commit corresponding to a commit comment event, require a personal access token. Refer [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for detailed instructions on token generation.
61
+
62
+
### `gh_hook_token`
63
+
64
+
Refer [here](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/securing-your-webhooks) for more information on securing webhooks with a token.
0 commit comments