docs: Completely rewrite README with updated architecture and diagram… #4252
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Metadata • Issues & PRs | ||
|
Check failure on line 1 in .github/workflows/metadata-governance.yml
|
||
| on: | ||
| issues: | ||
| # labeled/unlabeled added so native type syncs when a type:* label changes | ||
| types: [opened, reopened, edited, labeled, unlabeled] | ||
| pull_request_target: | ||
| types: [opened, reopened, edited, synchronize, ready_for_review] | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write | ||
| # Required for GraphQL mutations that set native issue types | ||
| repository-projects: write | ||
| concurrency: | ||
| group: metadata-governance-${{ github.event_name }}-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| sync-metadata: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | ||
| ref: ${{ github.event.pull_request.head.ref || github.ref_name }} | ||
| fetch-depth: 0 | ||
| clean: true | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version-file: ".nvmrc" | ||
| - name: Install dependencies | ||
| run: npm ci --ignore-scripts | ||
| - name: Sync issue and PR metadata | ||
| id: metadata | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| ISSUE_FIELDS_CONFIG: .github/issue-fields.yml | ||
| run: node scripts/agents/includes/issue-pr-metadata.cjs | ||
| - name: Allocate issue to version milestone | ||
| id: milestone-allocation | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PROJECT_ROUTES_CONFIG: .github/project-routes.yml | ||
| GITHUB_EVENT_PATH: ${{ github.event_path }} | ||
| run: node scripts/agents/includes/allocate-milestone.cjs | ||
| - name: Check milestone capacity and warn | ||
| id: capacity-check | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PROJECT_ROUTES_CONFIG: .github/project-routes.yml | ||
| GITHUB_EVENT_PATH: ${{ github.event_path }} | ||
| run: node scripts/agents/includes/check-milestone-capacity.cjs | ||
| - name: Summarise metadata sync | ||
| env: | ||
| METADATA_ASSIGNEE: ${{ steps.metadata.outputs.metadata_assignee }} | ||
| METADATA_MILESTONE: ${{ steps.metadata.outputs.metadata_milestone }} | ||
| METADATA_LINKED_REFS: ${{ steps.metadata.outputs.metadata_linked_refs }} | ||
| METADATA_PARENT_REFS: ${{ steps.metadata.outputs.metadata_parent_refs }} | ||
| METADATA_CHILD_REFS: ${{ steps.metadata.outputs.metadata_child_refs }} | ||
| METADATA_BLOCKS_REFS: ${{ steps.metadata.outputs.metadata_blocks_refs }} | ||
| METADATA_BLOCKED_BY_REFS: ${{ steps.metadata.outputs.metadata_blocked_by_refs }} | ||
| METADATA_SECURITY_REFS: ${{ steps.metadata.outputs.metadata_security_refs }} | ||
| run: | | ||
| { | ||
| echo "### Metadata governance" | ||
| echo "- Assignee: ${METADATA_ASSIGNEE:-none}" | ||
| echo "- Milestone: ${METADATA_MILESTONE:-none}" | ||
| echo "- Linked refs: ${METADATA_LINKED_REFS:-none}" | ||
| echo "- Parent refs: ${METADATA_PARENT_REFS:-none}" | ||
| echo "- Child refs: ${METADATA_CHILD_REFS:-none}" | ||
| echo "- Blocks refs: ${METADATA_BLOCKS_REFS:-none}" | ||
| echo "- Blocked-by refs: ${METADATA_BLOCKED_BY_REFS:-none}" | ||
| echo "- Security refs: ${METADATA_SECURITY_REFS:-none}" | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
| # ── Native issue type sync ──────────────────────────────────────────────── | ||
| # Sets the GitHub native issue type (Bug / Feature / Task / etc.) directly | ||
| # on the issue using the type:* label → project_field_mappings.Type mapping | ||
| # in .github/issue-fields.yml. Requires a GitHub App token with | ||
| # issues:write and project scope (supplied via LS_APP_PRIVATE_KEY secret). | ||
| - name: Create GitHub App token for native type sync | ||
| id: app-token | ||
| if: | | ||
| github.event_name == 'issues' && | ||
| vars.LS_APP_ID != '' && | ||
| secrets.LS_APP_PRIVATE_KEY != '' | ||
| uses: actions/create-github-app-token@v3 | ||
| with: | ||
| app-id: ${{ vars.LS_APP_ID }} | ||
| private-key: ${{ secrets.LS_APP_PRIVATE_KEY }} | ||
| repositories: ${{ github.repository }} | ||
| permission-issues: write | ||
| - name: Sync native issue type from type:* label | ||
| id: native-type | ||
| if: github.event_name == 'issues' && steps.app-token.outputs.token != '' | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | ||
| ISSUE_FIELDS_CONFIG: .github/issue-fields.yml | ||
| DRY_RUN: "false" | ||
| run: node scripts/agents/includes/sync-issue-fields.cjs | ||
| - name: Append native type result to summary | ||
| if: github.event_name == 'issues' | ||
| env: | ||
| APP_CONFIGURED: ${{ vars.LS_APP_ID != '' && secrets.LS_APP_PRIVATE_KEY != '' }} | ||
| NATIVE_TYPE: ${{ steps.native-type.outputs.native_type_set }} | ||
| run: bash scripts/summarize-native-type.sh | ||