Git Product home page Git Product logo

github-linear-bridge's Introduction

Nomic Foundation's Github <> Linear bridge

WARNING: This is not intended to be used by other people/teams, and as such it may completely fail, stop working, or get modified or deleted without previous notice.

This repository contains two different projects:

  1. Two Github Action workflows to sync in the Github > Linear direction.

  2. A Vercel/Next.js API to sync in the Linear > Github direction.

Github Action workflows

This part of the project, which can be found in .github/ contains some private actions and two example workflows.

Note that the actions are not published, so the workflows setup node, npm install in the right directory, and run a node script from the actions manually.

The first workflow, .github/workflows/create-linear-issue.yml is in charge of:

  • Creating a Linear issue for each new Github issue
  • Creating a Linear issue for each new PR opened by an external contributor
  • Pick the same random assignee for both issues (i.e. Github and Linear)
  • Comments on the issue/PR with a link to the linear issue and its id

The second workflow, .github/workflows/close-linear-issue.yml is in charge of:

  • Whenever an issue/PR gets closed, it closes the associated Linear issue created by the other workflow, if any

Setup

Both workflows require these environment variables:

  • GITHUB_TOKEN: It must be ${{ secrets.GITHUB_TOKEN }}
  • LINEAR_API_KEY: An API key for the Linear user we use for automation
  • LINEAR_TEAM_ID: The ID of the team associated to this project
  • MAINTAINERS: A ; separted list of Github users that maintain the repository

The Linear team workflow must have an Autoclosed state with type Completed.

The file packages/linear-webhooks/api/github-linear-users-config.ts must be kept up-to-date.

Vercel API

This part of the project, which can be found in packages/linear-webhooks contains a single-endpoint API that needs to be setup as a Linear webhook

It is in charge of:

  • Close an associated Github issue when a Linear issue is closed/deleted, if any
  • Open an associated Github issue when a Linear issue is reopened/restored after deletion, if any
  • Update the Github issue assignee when a Linear issue gets reassigned/unassigned if any

Setup

This application must be deployed into Vercel, and setup as a webhook for the Linear workspace. The webhook should be configured to receive the Issues event types.

A single installation for the entire workspace is enough.

The webhook requires these environment variables:

  • LINEAR_API_KEY: An API key for the Linear user we use for automation
  • GITHUB_ACCESS_TOKEN: A personal Github access token of the user we use for automation, with public repositories access
  • LINEAR_TEST_TEAM_ID: The ID of the Linear team that we use to test these integrations.
  • IS_TEST_DEPLOYMENT: ONLY FOR TEST DEPLOYMENT โ€” Any value

The file packages/linear-webhooks/api/github-linear-users-config.ts must be kept up-to-date.

github-linear-bridge's People

Contributors

alcuadrado avatar feugenea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.