An open API service indexing awesome lists of open source software.

https://github.com/aprilnea/linear-notify

๐Ÿ”” Bridge Linear webhooks to Discord, Telegram, Slack and more. Deploy with Docker, Node.js, or serverless platforms like Cloudflare Workers.
https://github.com/aprilnea/linear-notify

discord linear linear-app notification self-hosted serverless telegram webhook

Last synced: 7 months ago
JSON representation

๐Ÿ”” Bridge Linear webhooks to Discord, Telegram, Slack and more. Deploy with Docker, Node.js, or serverless platforms like Cloudflare Workers.

Awesome Lists containing this project

README

          

# Linear Notify

A webhook forwarder service that receives notifications from [Linear](https://linear.app) and forwards them to various messaging platforms with rich formatting.

## Features

- ๐Ÿš€ **Discord Integration**: Receives Linear webhooks and sends beautifully formatted messages to Discord channels
- ๐Ÿ” **Secure**: Validates webhook signatures to ensure authenticity
- โšก **Fast**: Built on Cloudflare Workers for global edge deployment
- ๐Ÿงช **Well Tested**: Comprehensive test coverage with Vitest

## Supported Platforms

- โœ… **Discord** - Currently supported
- ๐Ÿ”„ **Telegram** - Coming soon
- ๐Ÿ“‹ **More platforms** - Slack, Teams, and others planned

## Setup

### Prerequisites

- Node.js 18+
- A Cloudflare account
- Discord webhook URL
- Linear workspace with webhook access

### Installation

```bash
npm install
```

### Configuration

Set up the following environment variables in your Cloudflare Worker:

- `DISCORD_WEBHOOK_URL`: Your Discord webhook URL
- `LINEAR_WEBHOOK_SECRET`: (Optional) Linear webhook secret for signature validation

### Development

Start the development server:

```bash
pnpm run dev
```

### Testing

Run the test suite:

```bash
pnpm run test
```

Run tests with coverage:

```bash
pnpm run test:coverage
```

### Deployment

Deploy to Cloudflare Workers:

```bash
pnpm run deploy
```

### Type Generation

Generate types based on your Worker configuration:

```bash
pnpm run cf-typegen
```

## Usage

### Discord Integration

1. Create a Discord webhook in your desired channel
2. Set the `DISCORD_WEBHOOK_URL` environment variable
3. Configure Linear to send webhooks to: `https://your-worker-domain.workers.dev/discord/webhook`

The service will automatically format Linear events (issues, comments, status changes, etc.) into rich Discord embeds.

### Webhook Endpoint

- **Discord**: `POST /discord/webhook`
- **Health Check**: `GET /` - Returns service status

## Development

The project uses:

- **Hono** - Fast web framework for Cloudflare Workers
- **Linear SDK** - Official Linear API SDK
- **Vitest** - Testing framework
- **TypeScript** - Type safety

### Project Structure

```
src/
โ”œโ”€โ”€ index.ts # Main application entry point
โ”œโ”€โ”€ linear.ts # Linear webhook validation
โ”œโ”€โ”€ libs/
โ”‚ โ””โ”€โ”€ discord.ts # Discord message formatting and sending
โ””โ”€โ”€ routes/
โ””โ”€โ”€ discord.ts # Discord webhook route handler
```

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Run the test suite
6. Submit a pull request

## License

MIT

## Roadmap

- [ ] Telegram bot integration
- [ ] Slack integration
- [ ] Microsoft Teams support
- [ ] Webhook replay functionality
- [ ] Message customization templates
- [ ] Multiple destination support per webhook