Skip to content

docs: update GitHub Actions data masking tutorials to latest API#1080

Open
adela-bytebase wants to merge 2 commits intomainfrom
docs/github-action-masking-api-update
Open

docs: update GitHub Actions data masking tutorials to latest API#1080
adela-bytebase wants to merge 2 commits intomainfrom
docs/github-action-masking-api-update

Conversation

@adela-bytebase
Copy link
Copy Markdown
Contributor

@adela-bytebase adela-bytebase commented Apr 17, 2026

Summary

  • Update API endpoints in the GitHub Actions data masking tutorial series (3 parts) to match the current Bytebase API
  • Setting names migrated from bb.workspace.* to UPPERCASE enum names (SEMANTIC_TYPES, DATA_CLASSIFICATION)
  • Policy URLs now require workspace prefix (workspaces/-/policies/masking_rule)
  • Masking exception → exemption (API rename)
  • Fix classification file reference (masking/classification.jsonmasking/data-classification.json)

Companion PR for the example repo: bytebase/example-database-security#96

Test plan

  • Verify API endpoints match proto definitions
  • Cross-check with example repo changes

🤖 Generated with Claude Code

- Setting names: bb.workspace.semantic-types → SEMANTIC_TYPES,
  bb.workspace.data-classification → DATA_CLASSIFICATION
- Policy URL: policies/masking_rule → workspaces/-/policies/masking_rule
- Masking exception → exemption (API rename)
- Fix classification file reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 17, 2026 13:24
@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Apr 17, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
bytebase-doc 🟢 Ready View Preview Apr 17, 2026, 1:25 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bytebase-com Ready Ready Preview, Comment Apr 17, 2026 2:13pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the GitHub Actions “data masking” tutorial series to align the curl examples and file references with the latest Bytebase API naming and routing conventions.

Changes:

  • Update workspace setting endpoints to use enum-style setting names (e.g., SEMANTIC_TYPES, DATA_CLASSIFICATION).
  • Update policy endpoints to include the workspace prefix where required (e.g., workspaces/-/policies/masking_rule) and rename masking exception → exemption.
  • Fix the referenced classification file path (masking/data-classification.json).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docs/tutorials/github-action-data-masking-part1.mdx Updates semantic type setting endpoint and global masking rule policy path to the current API routes.
docs/tutorials/github-action-data-masking-part2.mdx Renames masking exception → exemption in both wording and policy endpoint/file path references.
docs/tutorials/github-action-data-masking-part3.mdx Updates classification file name reference and setting endpoint to DATA_CLASSIFICATION.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

### In GitHub Workflow

Find the step `Apply classification`, which will apply the classification to the database via API. All the classifications should be defined in one file in the root directory as `masking/classification.json`. The code it calls Bytebase API is as follows:
Find the step `Apply classification`, which will apply the classification to the database via API. All the classifications should be defined in one file in the root directory as `masking/data-classification.json`. The code it calls Bytebase API is as follows:
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: “The code it calls Bytebase API…” is unidiomatic/unclear. Consider rephrasing to something like “The code to call the Bytebase API is as follows:” so the sentence reads naturally.

Suggested change
Find the step `Apply classification`, which will apply the classification to the database via API. All the classifications should be defined in one file in the root directory as `masking/data-classification.json`. The code it calls Bytebase API is as follows:
Find the step `Apply classification`, which will apply the classification to the database via API. All the classifications should be defined in one file in the root directory as `masking/data-classification.json`. The code to call the Bytebase API is as follows:

Copilot uses AI. Check for mistakes.
### In GitHub Workflow

Find the step `Apply masking exception`, which will apply the masking exception to the database and the process is similar, the code it calls Bytebase API is as follows:
Find the step `Apply masking exemption`, which will apply the masking exemption to the database and the process is similar, the code it calls Bytebase API is as follows:
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: “the code it calls Bytebase API…” is unidiomatic. Rephrase to “the code to call the Bytebase API is as follows:” (or similar) for readability.

Suggested change
Find the step `Apply masking exemption`, which will apply the masking exemption to the database and the process is similar, the code it calls Bytebase API is as follows:
Find the step `Apply masking exemption`, which applies the masking exemption to the database. The process is similar, and the code to call the Bytebase API is as follows:

Copilot uses AI. Check for mistakes.
```

By changing file `masking/projects/**/masking-exception.json`, create a PR and then merge, the change will be applied.
By changing file `masking/projects/**/masking-exemption.json`, create a PR and then merge, the change will be applied.
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammar: “By changing file …, create a PR and then merge” reads awkwardly. Consider “By changing the file …, creating a PR, and merging it, the change will be applied.”

Suggested change
By changing file `masking/projects/**/masking-exemption.json`, create a PR and then merge, the change will be applied.
By changing the file `masking/projects/**/masking-exemption.json`, creating a PR, and merging it, the change will be applied.

Copilot uses AI. Check for mistakes.
adela-bytebase added a commit to bytebase/example-database-security that referenced this pull request Apr 17, 2026
Breaking API changes addressed:
- Setting names: bb.workspace.semantic-types → SEMANTIC_TYPES,
  bb.workspace.data-classification → DATA_CLASSIFICATION (migrated in v3.7)
- Policy URLs: policies/masking_rule → workspaces/-/policies/masking_rule
  (workspace prefix required by gRPC-gateway route)
- Masking exception → exemption: renamed policy type, JSON fields, and
  data file (masking_exception → masking_exemption, maskingExceptionPolicy
  → maskingExemptionPolicy, maskingExceptions → exemptions)
- CEL expressions: add resource. prefix (resource.environment_id,
  resource.classification_level)
- Classification levels: id (string) → level (integer), levelId → level
- JSON body fields: semanticTypeSettingValue → semanticType,
  data_classification_setting_value → dataClassification
- Masking exemption: action field removed, member → members (array)

Companion docs PR: bytebase/bytebase.com#1080

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Query params allowMissing and updateMask use camelCase as documented
in the Bytebase OpenAPI spec at api.bytebase.com.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants