jacob-ai-bot / jacob

Just Another Coding Bot
https://jacb.ai
Apache License 2.0
131 stars 20 forks source link

Implement Linear Integration in Project Settings with Issue Synchronization #288

Closed kleneway closed 1 week ago

kleneway commented 2 weeks ago

Description

We need to integrate the project management tool Linear into our application to allow users to sync issues seamlessly between Linear and GitHub. This involves updating the settings page to enable users to connect their Linear accounts and manage issue synchronization.

Requirements

  1. Add 'Connect to Linear' Button

    • On the settings page, add a button labeled "Connect to Linear".
    • This button should initiate the OAuth flow for Linear authentication.
  2. Implement OAuth Flow with Linear

    • When the user clicks the "Connect to Linear" button, start the Linear OAuth authentication process.
    • Obtain the access token, refresh token, and expiration dates upon successful authentication.
    • Ensure secure storage and management of these tokens, including handling token refreshes as needed.
  3. Redirect Back to Settings Page

    • After successful authentication, redirect the user back to the settings page.
    • Display a confirmation message indicating that the Linear account has been connected.
  4. Allow Project and Board Selection

    • Provide an interface on the settings page for the user to select a Linear project from their account.
    • Once a project is selected, enable the user to choose a board within that project.
    • Ensure that the list of projects and boards is fetched dynamically from the user's Linear account.
  5. Add 'Sync Issues' Button

    • After selecting a project and board, display a button labeled "Sync Issues".
    • When clicked, this button should manually trigger synchronization of issues from the selected Linear board to GitHub.
  6. Implement Automated Issue Synchronization

    • Develop a feature that checks for new issues on the connected Linear board every hour on the hour.
    • Automatically create corresponding GitHub issues for any new Linear issues found.
    • Ensure that issues are appropriately mapped and that duplicates are not created.
  7. Use Existing Workflow as Inspiration

    • Refer to the existing workflow for Dero as inspiration for this integration.
    • Adapt similar patterns and code structures where applicable to maintain consistency.

Expected Outcome