Fix audio playback and waveform rendering for the vsnd file preview widget #70
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: PR Triage | |
| on: | |
| pull_request_target: | |
| types: [ labeled ] | |
| jobs: | |
| pr-triaged: | |
| runs-on: ubuntu-latest | |
| if: github.event.label.name == 'triaged' | |
| steps: | |
| - name: Ensure PR checks passed | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const requiredChecks = ['Tests', 'Formatting']; | |
| const pr = context.payload.pull_request; | |
| if (!pr) { | |
| throw new Error('No pull request found in event payload.'); | |
| } | |
| const { data } = await github.rest.checks.listForRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: pr.head.sha, | |
| per_page: 100 | |
| }); | |
| const checkRuns = data.check_runs ?? []; | |
| for (const requiredCheck of requiredChecks) { | |
| const match = checkRuns.find(run => (run.name ?? '') === requiredCheck); | |
| if (!match || match.conclusion !== 'success') { | |
| const status = match ? (match.conclusion ?? match.status ?? 'unknown') : 'missing'; | |
| core.warning(`Required check '${requiredCheck}' did not pass (${status}). Removing triaged label.`); | |
| await github.rest.issues.removeLabel({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pr.number, | |
| name: 'triaged' | |
| }); | |
| throw new Error('Cannot triage until required checks succeed.'); | |
| } | |
| } | |
| - name: Repository Dispatch | |
| uses: actions/github-script@v7 | |
| env: | |
| DISPATCH_CONTEXT: ${{ toJson(github) }} | |
| with: | |
| github-token: ${{ secrets.SBOXBOT_TOKEN }} | |
| script: | | |
| const clientPayload = JSON.parse(process.env.DISPATCH_CONTEXT); | |
| await github.rest.repos.createDispatchEvent({ | |
| owner: 'Facepunch', | |
| repo: 'sbox', | |
| event_type: 'pr-triaged', | |
| client_payload: { github: clientPayload } | |
| }); |