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
`CHATOPS_AUTH_PUBLIC_KEY` is the public key of your chatops client in PEM
86
+
format. This environment variable will contain newlines.
87
+
88
+
`CHATOPS_AUTH_BASE_URL` is the base URL of your server as the chatops client
89
+
sees it. This is specified as an environment variable since rails will trust
90
+
client headers about forwarded host. For example, if your chatops client has
91
+
added the url `https://example.com/_chatops`, you'd set this to
92
+
`https://example.com`.
93
93
94
-
See [the protocol docs on authentication](https://github.com/github/hubot-classic/blob/master/docs/rpc_chatops_protocol.md#authentication) for more.
94
+
You can also set `CHATOPS_AUTH_ALT_PUBLIC_KEY` to a second public key which
95
+
will be accepted. This is helpful when rolling keys.
96
+
97
+
TODO: link to protocol docs.
95
98
96
99
## Staging
97
100
98
-
Use `.rpc set suffix https://myapp.githubapp.com/_chatops in staging`, and all
101
+
Use `.rpc set suffix https://myapp.example.com/_chatops in staging`, and all
99
102
your chatops will require the suffix `in staging`. This means you can do `.echo
100
103
foo` and `.echo foo in staging` to use two different servers to run `.echo foo`.
101
104
@@ -110,7 +113,7 @@ script/test
110
113
111
114
Early versions of RPC chatops had two major changes:
112
115
113
-
##### They used Rails' dynamic `:action` routing, which was deprecated in Rails 5.
116
+
##### Using Rails' dynamic `:action` routing, which was deprecated in Rails 5.
114
117
115
118
To work around this, you need to update your router boilerplate:
116
119
@@ -126,9 +129,9 @@ Becomes this:
126
129
post "/_chatops/:chatop", controller:"anonymous", action::execute_chatop
127
130
```
128
131
129
-
#####
132
+
#####Adding a prefix
130
133
131
-
They did not require a prefix. Version 2 of the Chatops RPC protocol assumes a unique prefix for each endpoint. This decision was made for several reasons:
134
+
Version 2 of the Chatops RPC protocol assumes a unique prefix for each endpoint. This decision was made for several reasons:
132
135
133
136
* The previous suffix-based system creates semantic ambiguities with keyword arguments
0 commit comments