Skip to content

build(deps-dev): bump picomatch from 2.3.1 to 2.3.2 in /components/centraldashboard-angular/backend #1046

build(deps-dev): bump picomatch from 2.3.1 to 2.3.2 in /components/centraldashboard-angular/backend

build(deps-dev): bump picomatch from 2.3.1 to 2.3.2 in /components/centraldashboard-angular/backend #1046

name: Approve Workflow Runs
permissions:
actions: write
contents: read
on:
pull_request_target:
types:
- labeled
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
ok-to-test:
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test')
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Approve Pending Workflow Runs
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
retries: 3
script: |
const request = {
owner: context.repo.owner,
repo: context.repo.repo,
event: "pull_request",
status: "action_required",
head_sha: context.payload.pull_request.head.sha,
}
core.info(`Getting workflow runs that need approval for commit ${request.head_sha}`)
const runs = await github.paginate(github.rest.actions.listWorkflowRunsForRepo, request)
core.info(`Found ${runs.length} workflow runs that need approval`)
for (const run of runs) {
core.info(`Approving workflow run ${run.id}`)
const request = {
owner: context.repo.owner,
repo: context.repo.repo,
run_id: run.id,
}
await github.rest.actions.approveWorkflowRun(request)
}