Skip to content

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

Merged
adela-bytebase merged 4 commits intomainfrom
docs/github-action-masking-api-update
Apr 21, 2026
Merged

docs: update GitHub Actions data masking tutorials to latest API#1080
adela-bytebase merged 4 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 21, 2026 9:35pm

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.

Comment thread docs/tutorials/github-action-data-masking-part3.mdx Outdated
Comment thread docs/tutorials/github-action-data-masking-part2.mdx Outdated
Comment thread docs/tutorials/github-action-data-masking-part2.mdx Outdated
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>
Small readability fixes to the API-call explanations in parts 2 and 3
so the sentences read naturally after the API-update rewrite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread docs/tutorials/github-action-data-masking-part1.mdx Outdated
The policy API uses the resource string as an exact-match filter, so
"workspaces/-" does not resolve to the current workspace for policy
endpoints (only GetWorkspace has dash-expansion). Without this, the
PATCH silently creates an orphan policy with resource="workspaces/-"
instead of updating the real one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adela-bytebase adela-bytebase merged commit 037be56 into main Apr 21, 2026
4 of 5 checks passed
@adela-bytebase adela-bytebase deleted the docs/github-action-masking-api-update branch April 21, 2026 21:34
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.

3 participants