This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Setup
xPolar edited this page Jul 12, 2022
·
1 revision
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.
- Go to "Workspace Settings" and then go to "API".
- Under "Webhooks" click "New webhook".
- Label this webhook whatever you want, however, set the URL to the URL of the deployed Vercel API, ensuring the URL ends with "/api".
- Under "Event Types" check "Issues", "Issue comments", and "Labels".
- Press "Create webhook".
- Go to "Workspace Settings" and then go to "API".
- Under "Personal API keys" enter a name for your API key in the "Label" field.
- Press "Create key".
- Hover over the created API key to copy it, make sure to save this somewhere as you can only view it upon creation.
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
}
}
}
}
}
- In a repository go to "Settings" -> "Webhooks".
- Press "Add webhook".
- Set the payload URL to the URL of the deployed Vercel API, ensuring the URL ends with "/api".
- Set "Content type" to
application/json
. - Set the "Secret" to a random string, make sure to set it in the .env file as well.
- Press "Let me select individual events." and check "Issue comments" and "Issues".
- Press "Add webhook"
- Log in to the account you want to use for syncing.
- Click on the dropdown in the top right where your profile picture is.
- Press "Settings" -> "Developer Settings" -> "Personal Access Tokens".
- Press "Generate new token".
- Write a memorable note.
- Set Expiration to "No Expiration".
- 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!
- Press "Generate token".
- Copy the generated token.