Repository navigation
test(core): the touch presentation's browser proofs run on the interaction harness #35344
Workflow file for this run
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
| # Copyright (c) Meta Platforms, Inc. and affiliates. | ||
|
Check warning on line 1 in .github/workflows/spec-owner-gate.yml
|
||
| # Current knowledge records are consequential to future reviewers. Creating, | ||
| # changing, or archiving one waits for owner approval. ENGOWNERS may approve | ||
| # every record kind. Current design and theme records, component/module | ||
| # Design-decision-only changes, and normative design assets also accept | ||
| # DESIGNOWNERS. Mixed DD plus other component/module spec edits require both | ||
| # design and engineering. Other mixed PRs keep every applicable owner-group | ||
| # requirement. Pure spec-record PRs | ||
| # skip heavy CI only when every changed path is recognized; draft-only records | ||
| # can auto-merge after validation, while current records also need approval on | ||
| # the exact current head. | ||
| name: Spec owner gate | ||
| on: | ||
| pull_request_target: | ||
| branches: [main] | ||
| types: | ||
| [ | ||
| opened, | ||
| synchronize, | ||
| reopened, | ||
| ready_for_review, | ||
| converted_to_draft, | ||
| auto_merge_enabled, | ||
| ] | ||
| pull_request_review: | ||
| types: [submitted, dismissed] | ||
| issue_comment: | ||
| types: [created] | ||
| # A review app relays an owner's exact-head decision. The reconciler accepts | ||
| # it only from the app named in the SPEC_DECISION_APP repository variable. | ||
| repository_dispatch: | ||
| types: [spec-owner-decision] | ||
| workflow_dispatch: | ||
| inputs: | ||
| pr: | ||
| description: Pull request number to reconcile | ||
| required: true | ||
| type: string | ||
| backfill: | ||
| description: >- | ||
| Publish the gate status only. Use this when backfilling heads that | ||
| predate the required check, so a reconcile cannot also enable | ||
| auto-merge on a pull request nobody asked to land. | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| permissions: {} | ||
| env: | ||
| REVIEW_LABEL: needs:spec-owner-review | ||
| AUTO_MERGE_LABEL: spec-auto-merge | ||
| SPEC_DECISION_APP: ${{ vars.SPEC_DECISION_APP }} | ||
| jobs: | ||
| reconcile: | ||
| # Fork review events have read-only tokens. Same-repo reviews reconcile | ||
| # automatically; fork approvals use the trusted issue_comment command path. | ||
| # The comment filter admits any owner-command shape, including one missing | ||
| # the head SHA, so the reconciler answers it instead of ignoring it. | ||
| if: >- | ||
| (github.event_name != 'pull_request_review' || | ||
| github.event.pull_request.head.repo.full_name == github.repository) && | ||
| (github.event_name != 'issue_comment' || | ||
| (github.event.issue.pull_request != null && | ||
| (startsWith(github.event.comment.body, '/approve-spec') || | ||
| startsWith(github.event.comment.body, '/revoke-spec')))) | ||
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| statuses: write | ||
| steps: | ||
| # Every privileged event checks out the trusted default branch. Never | ||
| # execute the PR merge ref or PR-controlled helpers with write permissions. | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ github.event.repository.default_branch }} | ||
| - name: Reconcile owner gate | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| retries: 3 | ||
| script: | | ||
| const path = require('node:path'); | ||
| const {reconcileSpecOwnerGate} = require(path.join( | ||
| process.env.GITHUB_WORKSPACE, | ||
| '.github/scripts/spec-owner-reconcile.cjs', | ||
| )); | ||
| await reconcileSpecOwnerGate({github, context, core}); | ||