Linear integration

Integrating with Linear

Integrating Linear into Jit enables you to efficiently assign security-related tickets from Jit directly to Engineering and Security teams. Learn more here.

Integration steps

  • Step 1: Creating an API token in your Linear account.
  • Step 2: Assigning a secret to the API token in Jit.
  • Step 3: Adding the secret's name and other fields to the jit-integration.yml file in the Jit centralized repo.

Step 1: Creating the API token

  1. Log in to your Linear account.

  2. Go to Settings > API.

    1. Under Personal API keys.
    2. Enter a label name. We recommend jit_token.
    3. Click Create key.
    4. Click the display token to Copy to clipboard.

Learn more in Linear documentation.

Step 2: Assigning a secret to the API token

  1. In the Jit platform, go to Settings and click Secrets.

  2. Click Create new secret to add the API token. We recommend naming the secret - linear_token.

Learn more about Secrets.

Step 3: Creating the integration

  1. In the Jit platform, go to Integrations and scroll to the Linear tile.

  2. Click Integrate as-code to display the jit-integration.yml file in your centralized Jit repo.

  3. Paste the following Linear integration-structure in the file.

linear:
  `linear_integration_name`:
    auth:
      api_token: ${{ jit_secrets.`secret_name` }}
    preferences:
      team_id: `your_team_id`
      project_id: `your_project_id`
  1. Update the keys using the following information:
KeyValue
linear_integration_nameGive a name for this specific integration, it can be your Linear workspace name, e.g., Engineering.
secret_nameThe secret name defined in Step 2, e.g., linear_token.
your_team_idRetrieve this value by querying the graphql API at https://api.linear.app/graphql. For instructions, see Linear documentation.
your_project_id (optional)Retrieve this value by querying the graphql API at https://api.linear.app/graphql. For instructions, see Linear documentation.

For example:

linear:
  Engineering:
    auth:
      api_token: ${{ jit_secrets.linear_token }}
    preferences:
      team_id: Eng