Skip to content

Latest commit

 

History

History
 
 

jira

Bytebase Jira Integration Example

This is a sample app demonstrating how to integrate Bytebase with Jira for automated database change management.

Corresponding tutorial 🔗

Jira Integration

Prerequisites

  • Node.js >= 18
  • A running Bytebase instance
  • A Jira account with appropriate permissions
  • Bytebase service account with necessary permissions

Getting Started

Step 1 - Set up Bytebase and Jira

  1. Follow the Self-host Bytebase via docker guide to set up Bytebase.
  2. Create a Bytebase service account with the necessary permissions.
  3. Set up a Jira project for database change management.

Step 2 - Configure and Run the App

  1. Clone this repository.

  2. Copy env-template.local to .env.local.

    cp env-template.local .env.local
  3. Update the .env.local file with your Bytebase and Jira details:

    NEXT_PUBLIC_JIRA_BASE_URL=https://xxxxxx.atlassian.net
    [email protected]
    NEXT_PUBLIC_JIRA_API_TOKEN=xxxxxxx
    NEXT_PUBLIC_JIRA_PROJECT_KEY=KEY
    NEXT_PUBLIC_BB_PROJECT_NAME=projects/jira-api
    NEXT_PUBLIC_BB_HOST=https://xxxxxxx
    [email protected]
    NEXT_PUBLIC_BB_SERVICE_KEY=bbs_xxxxxx
    
    
  4. Install dependencies and run the development server:

    pnpm i && pnpm dev
  5. Open http://localhost:3000 with your browser to see the running app.

API Usage

This app demonstrates the integration between Bytebase and Jira, including:

  • Creating Jira issues for database changes
  • Creating Bytebase issues based on Jira issue status
  • Syncing status between Bytebase and Jira

For more details on the Bytebase API, refer to the official documentation.

For Jira API usage, consult the Jira Cloud REST API documentation.