This webhook integration allows you to open a development environment on CodeSandbox directly from a Linear issue.
You can fork this template to set this up for yourself
- Fork this repository so you get your own server and make it private in GitHub
- (Optional) import your repository in CodeSandbox at codesandbox.io/p/dashboard
- Change the configuration (/src/config.ts) to include your
repositories
- Note, the
main
branch is protected, so you need to create a new branch (Branch in top right), make your changes there and then click "Open PR" to merge the changes back.
- Note, the
- Generate an API token in Linear
- In Linear, go to Workspace Settings
- Go to API
- Create a personal API key
- Add the API token to the environment variables
- Open the command palette (CMD/Ctrl + Shift + P) and search for "Add environment variables".
- Add the env var under the name
LINEAR_KEY
- Restart the instance, and you should have your webhook server running!
- Add the Webhook to Linear
- Go to the main branch of this repo
- Copy the URL http://localhost:3000/linear-webhook <- this URL corresponds to this branch if you open this README in CodeSandbox. Otherwise you can check the preview URL in the preview devtool on the right.
- In Linear, go to Workspace Settings, and add it to the Webhooks under API
- Now you will have CodeSandbox links in Linear for new issues!