Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julien-r44/gitlab-slack-release-notifier
🤖 A small service that sends a notification on Slack when a release has been published on GitLab.
https://github.com/julien-r44/gitlab-slack-release-notifier
gitlab notification slack webhook
Last synced: 12 days ago
JSON representation
🤖 A small service that sends a notification on Slack when a release has been published on GitLab.
- Host: GitHub
- URL: https://github.com/julien-r44/gitlab-slack-release-notifier
- Owner: Julien-R44
- License: mit
- Created: 2022-05-17T22:50:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T12:38:32.000Z (almost 2 years ago)
- Last Synced: 2024-10-07T00:48:03.014Z (3 months ago)
- Topics: gitlab, notification, slack, webhook
- Language: TypeScript
- Homepage:
- Size: 128 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
Gitlab Slack Release Notifier
🤖 A small service that sends a notification on Slack when a release has been published on Gitlab.
## Installation
### Install via npm
```bash
npm install -g gitlab-slack-release-notifier
SLACK_WEBHOOK=https://slack-webhook gitlab-slack-release-notifier
```It is recommended to run this application as a background process. Here is a basic example with Pm2 :
```js
module.exports = {
apps: [
{
name: 'gitlab-slack-release-notifier',
script: 'npx gitlab-slack-release-notifier',
env: {
SLACK_WEBHOOK: "https://slack-webhook",
PORT: "8080"
}
},
],
}
```### Install via Docker
Soon !
### Connect to your GitLab project
Once your service is launched with the correct url of your Slack webhook, the only thing left is to add a webhook on your GitLab project in Settings > Webhooks.
So create a new webook, with the url of the service and check the "Releases event" box. Once registered, you can test it directly from GitLab and if you have configured everything properly, you should receive a notification on your Slack channel. 🚀
### Configuration
Here are the environment variables you can modify:
`GITLAB_SECRET_TOKEN`: Secret token to validate received Gitlab payloads
`SLACK_WEBHOOK`: The URL of the Slack Webhook to send the message to
`WITH_FUNKY_EMOJIS`: If set to `true`, the bot will display a random emoji next to the notification header in Slack. ( default: `false` )
`PORT`: The port to listen on. ( default: 3000 )
`ADDRESS`: The address to listen on. ( default: `localhost` )
## License
[MIT](./LICENSE.md) License © 2022 [Julien Ripouteau](https://github.com/Julien-R44)