feat(core): Add Sentry.appLoaded() API to signal app start end #175
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
| name: Cancel PR Workflows | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| cancel: | |
| name: Cancel In-Progress Workflows | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cancel in-progress workflow runs | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const branch = context.payload.pull_request.head.ref; | |
| const workflows = await github.rest.actions.listWorkflowRunsForRepo({ | |
| owner, | |
| repo, | |
| branch, | |
| status: 'in_progress', | |
| }); | |
| const waitingWorkflows = await github.rest.actions.listWorkflowRunsForRepo({ | |
| owner, | |
| repo, | |
| branch, | |
| status: 'queued', | |
| }); | |
| const runs = [...workflows.data.workflow_runs, ...waitingWorkflows.data.workflow_runs]; | |
| for (const run of runs) { | |
| if (run.id === context.runId) { | |
| continue; | |
| } | |
| try { | |
| console.log(`Cancelling run ${run.id} (${run.name})`); | |
| await github.rest.actions.cancelWorkflowRun({ | |
| owner, | |
| repo, | |
| run_id: run.id, | |
| }); | |
| } catch (error) { | |
| console.log(`Failed to cancel run ${run.id}: ${error.message}`); | |
| } | |
| } | |
| console.log(`Cancelled ${runs.length > 1 ? runs.length - 1 : 0} workflow run(s) for branch ${branch}`); |