https://github.com/andrewmcloud/bitslack
bitbucket server slack webhook
https://github.com/andrewmcloud/bitslack
Last synced: about 2 months ago
JSON representation
bitbucket server slack webhook
- Host: GitHub
- URL: https://github.com/andrewmcloud/bitslack
- Owner: andrewmcloud
- License: epl-1.0
- Created: 2018-03-04T23:22:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-05T01:57:17.000Z (about 7 years ago)
- Last Synced: 2025-02-06T13:51:44.389Z (3 months ago)
- Language: Clojure
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# bitslack
simple slack webhook integration for bitbucket server## Installation
create a slack webhook address within the slack application and add it in place of the address in resources/config.edu
```
{:slack-webhook "https://hooks.slack.com/services/my/webhook/here"}
```
recommend running as a heroku app.
### Heroku app
download heroku cli
```bash
sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku
```
clone bitslack
```bash
git clone https://github.com/andrewmcloud/bitslack.git
```
create a heroku app:*note: when you create an app, a git remote (called heroku) is created and associated with your local git repo*
```bash
heroku create {{app-name-here}}
```
push bitslack to your heroku repo
```bash
git push heroku master
```
ensure an instance is running:
```bash
heroku ps:scale web=1
```
visit your app to ensure it is up and running. You should see a message from bitslack
```bash
heroku open
```
if your bitslack app fails, check the logs for clues
```bash
heroku logs --tail```
### Local server
enable port forwarding via your local routerstart the bitslack server
```bash
lein ring server-headless 3000
```
## Bitbucket Hooks
if using Heroku, add your heroku app URI as a Post-Receive WebHook
```
https://my-heroku-app.herokuapp.com/bitbucket
```
if running locally, add your external IP as a Post-Receive WebHook
```
http://my-external-ip:forwarded-port/bitbucket
```
## Add additional information
modify bitslack.server/app to add additional information to slack message; here is an example JSON response provided by bitbucket
[Bitbucket Server JSON payload](https://confluence.atlassian.com/bitbucketserver/post-service-webhook-for-bitbucket-server-776640367.html)
## License
do whatever you want with it