Skip to content

Instantly share code, notes, and snippets.

@hbowron
Last active February 5, 2024 15:17
Show Gist options
  • Select an option

  • Save hbowron/b50c4b86e6238284410a3ea0733f4d3f to your computer and use it in GitHub Desktop.

Select an option

Save hbowron/b50c4b86e6238284410a3ea0733f4d3f to your computer and use it in GitHub Desktop.
Redirecting Graphite PRs to Github

How to use the Graphite Dashboard with Github PRs

Set up your dashboard

  1. Navigate to https://app.graphite.dev/
  2. Ensure Default repos is set to your most frequently used repositories
  3. Create a Waiting on me section and add the following filters (and ANDed):
    1. Directly includes reviewer: <your handle>
    2. PR Status is: Open
    3. Review status is: Review required
    4. PR does not have the minimum required approvals
    5. PR is not currently: merging
  4. Check PRs in this section add to the favicon badge count

image

Set up redirects

  1. Download the Redirector Chrome Extension
  2. Click Edit Redirects then import the export.json file

I recommand "Command+Click" to open PRs in a new tab - the redirect makes navigating between Github PRs and the Graphite dashboard via Back and Forward a little wonky

{
"createdBy": "Redirector v3.5.3",
"createdAt": "2023-04-24T17:18:27.936Z",
"redirects": [
{
"description": "Graphite PR to Github PR",
"exampleUrl": "https://app.graphite.dev/github/pr/BoltApp/kubernetes-deployments/51420/production-cleaning-up-values-files",
"exampleResult": "https://github.com/BoltApp/kubernetes-deployments/pull/51420",
"error": null,
"includePattern": "https://app.graphite.dev/github/pr/(.*?)/(.*?)/(\\d+)/.*",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "https://github.com/$1/$2/pull/$3",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"grouped": false,
"appliesTo": [
"main_frame",
"sub_frame",
"stylesheet",
"script",
"image",
"imageset",
"object",
"xmlhttprequest",
"history",
"other"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment