API
Issue
Tutorial: Create Issue with Bytebase API
Issue Endpoint | POST /v1/projects/-/issues |
Issue
drives the database operations in Bytebase. The issue contains following info:
- Issue metadata. e.g
title
anddescription
. - Plan. Contain one or multiple change statements and dictate how they are grouped and ordered. The plan layouts how to execute the change statements.
- Sheet. Plan references change statements via the
Sheet
object. EachSheet
contains one or more change statements. - Step. Plan orchestrates the order via
Step
. EachStep
specifies one or more changes units. A change unit specifies the SQL statements viaSheet
and the target database.
- Sheet. Plan references change statements via the
- Rollout. The actual execution of the plan.
How to create an issue
Code sample: https://github.com/bytebase/upsert-issue-action/blob/main/src/main.ts#L86-L92
Step 1: Create a plan.
See Plan API.
Step 2: Create a rollout for the plan
See Rollout API.