Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/lukehsiao/linear-reminder

A toy webhook server for automating sending Linear reminders
https://github.com/lukehsiao/linear-reminder

linear rocket rust shuttle webhooks

Last synced: 2 months ago
JSON representation

A toy webhook server for automating sending Linear reminders

Awesome Lists containing this project

README

        


🤖

linear-reminder



A webhook server for automating Linear reminders written in Rust and served with Shuttle.





Build Status


License



`linear-reminder` is a simple demo webhook server written using [Rocket](https://rocket.rs) for automating a specific workflow of reminders in [Linear](https://linear.app).

## The workflow

Suppose you have an intermediate status that your devs tickets go to.
For example, maybe you have a `Merged` state tickets go to as soon as their associated pull requests merge.
However, `Merged` is not the final desired state.
Perhaps these tickets need to move from `Merged` to either `QA Ready` or `Done`.

```mermaid
stateDiagram-v2
qa: QA Ready
Merged --> Done
Merged --> qa
qa --> Done
```

But, it's easy to forget that, so you want some way to remind people to move the ticket along by posting a comment on tickets which are sitting in `Merged` for some amount of time.

`linear-reminder` is a webhook server to accomplish that.

## Configuration

This server can be configured using standard [Rocket configuration](https://rocket.rs/guide/v0.5/configuration/).
Specifically, we add the following configuration options.

```toml
# Rocket.toml
[default]
# The amount of time to wait between an issue hiting the `target_status` and a reminder being sent.
# This is provided in "humantime" format (e.g, 15days 3hr 3min)
time_to_remind = '30min'

[default.linear]
# Your Linear personal api Key
api_key = 'insert-here'
# Your Linear webhook signing key
signing_key = 'insert-here'
# The target status to send reminders for
target_status = 'Merged'
# The content of the comment to send as the reminder.
# Must be a single line.
message = 'If this issue is QA-able, please write instructions and move to `QA Ready`. If not, mark it as `Done`. Thanks!\n\n*This is an automated message.*'
```

These can be overridden using [Shuttle Secrets](https://docs.shuttle.rs/resources/shuttle-secrets) when deployed.
```toml
# Secrets.toml
'ROCKET_LINEAR.API_KEY' = 'lin_api_fillinyourkey'
'ROCKET_LINEAR.SIGNING_KEY' = 'lin_wh_fillinyourotherkey'
'ROCKET_LINEAR.TARGET_STATUS' = 'Limbo'
'ROCKET_LINEAR.MESSAGE' = 'Get out of Limbo.'
'ROCKET_TIME_TO_REMIND' = '10min'
```