https://github.com/benmccallum/programmed-bot
A slack bot built with Azure Functions that integrates with BitBucket
https://github.com/benmccallum/programmed-bot
bitbucket slack slack-bot
Last synced: about 1 month ago
JSON representation
A slack bot built with Azure Functions that integrates with BitBucket
- Host: GitHub
- URL: https://github.com/benmccallum/programmed-bot
- Owner: benmccallum
- Created: 2018-06-07T10:33:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-29T09:01:33.000Z (almost 8 years ago)
- Last Synced: 2025-10-19T16:28:11.798Z (8 months ago)
- Topics: bitbucket, slack, slack-bot
- Language: C#
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProgrammedBot
This bot integrates BitBucket and Slack in the following ways:
* On push to a repository, posts a message to a Slack channel with author's name, repository name, number of commits pushed and the branch name.
* (WIP) On a schedule, can scan a repository for branches that are stale and post a message to a Slack channel with branch name, last commit date and diff to master so that it can potentially be removed.
## Getting started
1. Fork this repo.
2. Create a local.settings.json file with the following contents:
```json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"SlackWebhookUrl": "https://hooks.slack.com/services/your-slack-webhook-url-to-post-messages-to"
}
}
```
3. Create a Slack webhook that can be called to post messages into a channel and set the URL in the `SlackWebhookUrl` configuration.
4. Create an Azure Function with the portal, then configure git/kudu deployment to your forked repo.
5. Commit and push your changes to trigger a deployment.
6. Once the automated deployment completes, copy your Azure Function's `BitBucket-OnPush` URL.
7. Create an "on push" webhook in a BitBucket repository pasting your `BitBucket-OnPush` URL.
8. Commit and push changes to this BitBucket repository and see your Slack "bot" configured earlier report on the push automagically.