Skip to content

Conversation

@llewellyn-sl
Copy link
Contributor

@llewellyn-sl llewellyn-sl commented Jan 8, 2026

Summary

This PR adds automated synchronization of permissions documentation from the Platform repository to the docs repository.

What's New

GitHub Actions Workflow

  • File: .github/workflows/update-permissions-docs.yml
  • Listens for repository_dispatch events from Platform repo
  • Triggers when Platform's docs/grants_roles.md or docs/grants_operations.md are updated
  • Supports manual triggering via workflow_dispatch for testing
  • Creates draft PRs with synced changes for review

Python Script

  • File: .github/scripts/update-permissions-tables.py
  • Parses markdown tables from Platform grants files
  • Updates corresponding tables in docs repo:
    • grants_roles.mdroles.md (Role permissions table)
    • grants_operations.mdcustom-roles.md (Operations tables by section)
  • Handles partial failures gracefully with detailed error reporting
  • Generates UPDATE_ERRORS.md if any updates fail

Updated Files

The workflow automatically updates:

  • platform-cloud/docs/orgs-and-teams/roles.md
  • platform-enterprise_docs/orgs-and-teams/roles.md
  • platform-enterprise_docs/orgs-and-teams/custom-roles.md

How It Works

  1. Platform repo pushes to master with changes to grants files
  2. Platform workflow sends repository_dispatch event to docs repo
  3. Docs workflow fetches latest Platform grants files
  4. Python script parses and updates corresponding docs tables
  5. Creates draft PR with all changes for human review

Error Handling

  • Tracks successes and failures separately
  • Continues processing even if individual updates fail
  • Generates detailed error report for partial failures
  • Exit code indicates overall success/failure

Testing

Tested locally with mock Platform and docs repos. All table parsing and updates work correctly.

Related

This workflow pattern is similar to the existing generate-openapi-overlays.yml workflow.


🤖 Generated with Claude Code

Add GitHub Actions workflow and Python script to automatically sync
permissions tables from Platform repo to docs when grants files are
updated.

The workflow:
- Triggers on repository_dispatch from Platform repo
- Parses tables from Platform's grants_roles.md and grants_operations.md
- Updates corresponding tables in platform-cloud and platform-enterprise_docs
- Creates draft PR with changes for review
- Generates error report if any updates fail

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@netlify
Copy link

netlify bot commented Jan 8, 2026

Deploy Preview for seqera-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 39cc04f
🔍 Latest deploy log https://app.netlify.com/projects/seqera-docs/deploys/6960b4da42eb61000834d71c

@llewellyn-sl llewellyn-sl self-assigned this Jan 8, 2026
@llewellyn-sl
Copy link
Contributor Author

The workflow triggered successfully on push with the expected failure result since no Platform repo MD files were present. https://github.com/seqeralabs/docs/actions/runs/20845114947/job/59886847740

@llewellyn-sl llewellyn-sl merged commit 314ace4 into master Jan 12, 2026
5 of 9 checks passed
@llewellyn-sl llewellyn-sl deleted the permissions-docs-workflow branch January 12, 2026 14:10
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