# PR Canary for Raycast

URL: https://www.raycast.com/liran_mizrahi/canary

> List your open GitHub pull requests and open the preview environment URL that CI posts in the PR description or a PR comment.

- Install: raycast://extensions/liran_mizrahi/canary
- Author: [Liran Mizrahi](https://www.raycast.com/liran_mizrahi)
- Installs: 10
- Platforms: macOS
- Categories: Developer Tools
- Updated: 2026-11-26
- Source: https://github.com/raycast/extensions/tree/12867dbe92e790346812b4e71eab767a5607e266/extensions/canary/

## Commands

- **My PR Canaries**: List my open PRs and open their preview environment

## README

### PR Canary

Lists your open GitHub pull requests and opens the preview environment ("canary") that your CI posts in the PR description or as a PR comment, with the arrow keys and Enter.

![My PR Canaries](https://github.com/raycast/extensions/raw/12867dbe92e790346812b4e71eab767a5607e266/extensions/canary//media/canary-1.png)

#### Requirements

- A GitHub account with access to the repository.
- A CI job that writes the preview URL into the pull request description or comments it on the pull request.

The extension reads your pull requests, their descriptions and their comments through the GitHub API. On first run it asks you to sign in with GitHub (`repo` and `read:org` scopes). If your organization restricts third-party OAuth apps, set a **Personal Access Token** instead (see below).

#### Setup

| Preference                | Description                                                                                                                                                                                                                                                                                  |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Repository**            | The GitHub repository, as `owner/name`.                                                                                                                                                                                                                                                      |
| **Canary URL Prefix**     | Opens the URL that starts with this prefix, e.g. `https://dashboard.`: from the PR description first, else from the newest PR comment. Leave empty to use the URL labelled Canary, e.g. `[SaaS Canary](https://github.com/raycast/extensions/raw/12867dbe92e790346812b4e71eab767a5607e266/extensions/canary//…)` or `Canary available at: …`.                                                      |
| **Extra Link URL Prefix** | Optional. A second link to pull from the PR description or comments, e.g. your deploy dashboard.                                                                                                                                                                                             |
| **CI Comment Author**     | Optional. The GitHub login of the account that posts the preview URL, e.g. your CI bot (`platform-handler`). Only comments from this account are used, so nobody else can plant a link. If empty, comments from bot accounts and from repository owners, members and collaborators are used. |
| **Personal Access Token** | Optional. Used instead of the GitHub sign-in. Needs read access to pull requests (classic tokens: `repo`). Stored in Raycast's preferences.                                                                                                                                                  |
| **Latest Commit Check**   | On by default. Colors the **canary** tag yellow when the canary doesn't run the pull request's latest commit (see below).                                                                                                                                                                    |
| **Canary Version Path**   | The file on the canary that returns the commit it runs, looked up in each folder of the canary URL. Empty means `build-info.json`.                                                                                                                                                           |

#### Is the canary on my latest commit?

Each pull request shows its latest commit next to the title. With **Latest Commit Check** on (the default), the **canary** tag also shows whether the canary runs that commit:

| Canary tag | Meaning                                              |
| ---------- | ---------------------------------------------------- |
| green      | The canary runs the pull request's latest commit.    |
| yellow     | The canary runs an older commit. Hover to see which. |
| orange     | The canary's commit couldn't be read. Hover for why. |
| red        | The canary refused the check with a 403.             |

The check is skipped for canaries on `localhost` or a private-network address, so a link in a comment can't make the extension call services on your computer or network; those tags are orange too.

The extension asks the canary itself: it requests **Canary Version Path** on the canary's host and compares the commit there with the pull request's latest commit. The file can be JSON with a `commit`, `sha`, `revision` or `version` field, such as `{"version":"d2e2463"}`, or plain text holding only the commit. A short commit like `d2e2463` is enough.

A canary served under a path, such as `https://dashboard.example.com/pr-123/login/user`, is looked up in each folder of that URL, deepest first, down to the host root: `/pr-123/login/user/build-info.json`, `/pr-123/login/build-info.json`, `/pr-123/build-info.json`, then `/build-info.json`. The first one that holds a commit is used.

#### Actions

Press ⌘K on a pull request to see them all.

![Actions](https://github.com/raycast/extensions/raw/12867dbe92e790346812b4e71eab767a5607e266/extensions/canary//media/canary-2.png)

| Action            | Shortcut |
| ----------------- | -------- |
| Open Canary       | ↵        |
| Open Pull Request | ⌘⇧P      |
| Open Extra Link   | ⌘⇧A      |
| Copy Canary URL   | ⌘C       |
| Refresh           | ⌘R       |

#### Troubleshooting

- **"…is not visible" error:** the token can't see the repository. Check the repository name. If GitHub's message mentions SAML enforcement, authorize the token for your organization (GitHub → Settings → Tokens → Configure SSO). If you signed in with OAuth, an organization owner may need to approve Raycast for the organization, or you can use a Personal Access Token instead.
- **A pull request shows "no canary":** neither its description nor a trusted comment contains a matching URL yet. Check that your CI has posted it, that **Canary URL Prefix** matches, and, if several bots comment, set **CI Comment Author** to the one that posts the preview URL.
- **Empty list:** only open pull requests authored by you in the configured repository are shown.
