Pierre helps your team by posting any new pull requests in Stash into your Slack channel!
- Create a bot for your Slack team named
pierreand get the token - Determine the id of the channel you want your bot to post announcements in.
- To do so, go to
https://slack.com/api/channels.list?token=YOUR_TOKEN_HERE, replacing the token with the token generated in the last step. - Find the channel in the JSON with the name of the one you want
- Get the id of that channel (should look something like
C12345678) - Create a config file at
~/.pierre_configwith the following template:
{
"db": "<< postgres connection string >>",
"stash": {
"username": "<< a Stash username that has access to the projects >>",
"password": "<< password for that Stash user >>",
"base_url": "<< base url to Stash (including http/https) >>"
},
"slack": {
"token": "<< slack bot token from step 1 >>",
"channel": "<< channel id from step 2 >>"
},
"projects": [
{
"id": "<< Stash project ID (all uppercase – as it appears in url) >>",
"repo": "<< Stash repository name (as it appears in url) >>"
}
],
"users": {
"<< stash username>>": "<< slack username (including @) >>"
}
}cargo run --release
Pierre's portrait lovingly provided by robohash.org.
Pierre is distributed under the MIT License.
