Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
xPolar edited this page Jul 12, 2022 · 1 revision

Setup

Welcome to the installation page for Spacedrive's Linear and GitHub sync system.

You'll be able to follow along with this guide below, if you need any help please feel free to join our Discord.

Linear

Linear Webhook

  1. Go to "Workspace Settings" and then go to "API".
  2. Under "Webhooks" click "New webhook".
  3. Label this webhook whatever you want, however, set the URL to the URL of the deployed Vercel API, ensuring the URL ends with "/api".
  4. Under "Event Types" check "Issues", "Issue comments", and "Labels".
  5. Press "Create webhook".

Linear API Key

  1. Go to "Workspace Settings" and then go to "API".
  2. Under "Personal API keys" enter a name for your API key in the "Label" field.
  3. Press "Create key".
  4. Hover over the created API key to copy it, make sure to save this somewhere as you can only view it upon creation.

Linear IDs

To get all of the IDs needed from Linear run the following GQL request however you please. Make sure to have your "Authorization" header set to Bearer ${LINEAR_API_KEY} and "Content-Type" as application/json.

query {
	users {
		nodes {
			id
			name
			displayName
		}
	}
	teams {
		nodes {
			id
			name
			key
			labels {
				nodes {
					id
					name
				}
			}
			states {
				nodes {
					id
					name
				}
			}
		}
	}
}

GitHub

GitHub Webhook

  1. In a repository go to "Settings" -> "Webhooks".
  2. Press "Add webhook".
  3. Set the payload URL to the URL of the deployed Vercel API, ensuring the URL ends with "/api".
  4. Set "Content type" to application/json.
  5. Set the "Secret" to a random string, make sure to set it in the .env file as well.
  6. Press "Let me select individual events." and check "Issue comments" and "Issues".
  7. Press "Add webhook"

GitHub API Key

  1. Log in to the account you want to use for syncing.
  2. Click on the dropdown in the top right where your profile picture is.
  3. Press "Settings" -> "Developer Settings" -> "Personal Access Tokens".
  4. Press "Generate new token".
  5. Write a memorable note.
  6. Set Expiration to "No Expiration".
  7. Check all top-level scopes I wasn't able to figure out which scopes properly worked with both public and private repositories, if you have please feel free to make an issue!
  8. Press "Generate token".
  9. Copy the generated token.
Clone this wiki locally