# gitlab-slack-release-notifier

> 🤖 A small service that sends a notification on Slack when a release has been published on Gitlab.

Latest version **1.0.0-beta.2** (published 2022-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install gitlab-slack-release-notifier
pnpm add gitlab-slack-release-notifier
yarn add gitlab-slack-release-notifier
bun add gitlab-slack-release-notifier
```

Provides the command `gitlab-slack-release-notifier`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.2 |
| Published | 2022-05-18 |
| First published | 2022-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 (+16 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Julien Ripouteau |
| Maintainers | julien-r44 |
| Keywords | gitlab, slack, notification, release |

## Links

- npm: https://www.npmjs.com/package/gitlab-slack-release-notifier
- Repository: https://github.com/Julien-R44/gitlab-slack-release-notifier
- Homepage: https://github.com/Julien-R44/gitlab-slack-release-notifier#readme
- Issues: https://github.com/Julien-R44/gitlab-slack-release-notifier/issues
- Funding: https://github.com/sponsors/Julien-R44
- npm.io page: https://npm.io/package/gitlab-slack-release-notifier

## Dependencies (4)

- [undici](https://npm.io/package/undici.md) ^5.2.0
- [fastify](https://npm.io/package/fastify.md) ^3.29.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^3.2.4
- [slack-block-builder](https://npm.io/package/slack-block-builder.md) ^2.5.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.0-beta.2 (latest) — 2022-05-18

## README

<div align="center">
  <img src="https://i.imgur.com/rZtYZ0t.png" alt="" width="500px"/>
  <h3>Gitlab Slack Release Notifier</h3>
  <p>🤖 A small service that sends a notification on Slack when a release has been published on Gitlab.</p>
</div>
<br/>

## 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)

---
_Source: https://npm.io/package/gitlab-slack-release-notifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
