https://github.com/madsnedergaard/preview-link-in-linear
An action that adds GitHub Deployments preview links to Linear issues
https://github.com/madsnedergaard/preview-link-in-linear
actions preview-environment
Last synced: 3 months ago
JSON representation
An action that adds GitHub Deployments preview links to Linear issues
- Host: GitHub
- URL: https://github.com/madsnedergaard/preview-link-in-linear
- Owner: madsnedergaard
- License: mit
- Created: 2025-11-10T14:55:02.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-11-26T06:04:09.000Z (7 months ago)
- Last Synced: 2025-11-28T08:46:52.516Z (7 months ago)
- Topics: actions, preview-environment
- Language: TypeScript
- Homepage:
- Size: 3.96 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GitHub Deployments links in Linear
Make it easy to access your preview environments in Linear with this GitHub Action.

## Wait, doesn't Linear already have this?
[Yes, kinda](https://linear.app/docs/github#pull-request-preview-links) - if a comment or PR description contains a markdown link ending with "preview", Linear will show this nice little icon:

But this action is optimised towards those setups where you don't have a comment-based workflow and use GitHub Deployments directly.
## Usage
```yaml
name: Preview Links in Linear
# Run action when a new comment is added to a pull request and on deployment status changes
on: [issue_comment, deployment_status]
jobs:
preview-links-in-linear:
name: Preview Links in Linear
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Attach preview link to Linear issue
uses: madsnedergaard/preview-link-in-linear@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
```
### Configuration
**Linear API key**
Create a new Personal API key here: https://linear.app/{YOUR_ORGANIZATION}/settings/account/security
## How it works
1. The action is triggered when a new comment is added to a pull request (as we are expecting a Linear-bot comment with a link to the Linear issue) or a deployment status changes (we don't know what will come first, so we listen to both)
2. It finds GitHub deployments on the pull request
3. It finds the Linear issue associated with the pull request from the comment
4. It attaches the preview link to the Linear issue 🪄
### Supported providers
The following providers have been tested and verified to work:
- Fly (using [the action in their guide](https://fly.io/docs/blueprints/review-apps-guide/))
- Any custom setup that uses GitHub Deployments
## Contribution
Any feedback or suggestions are welcome, please open an issue or make a PR.