Skip to content

Carry speaker assignments into the live transcript engine #440

Carry speaker assignments into the live transcript engine

Carry speaker assignments into the live transcript engine #440

name: CLA maintainer skip
on:
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: read
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
skip:
if: contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.pull_request.author_association)
runs-on: ubuntu-24.04
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
deadline=$((SECONDS + 120))
while [ "$SECONDS" -lt "$deadline" ]; do
state="$(
gh api "repos/${GITHUB_REPOSITORY}/commits/${SHA}/status" \
--jq '[.statuses[] | select(.context=="license/cla") | .state] | first // empty' \
|| true
)"
if [ "$state" != "success" ]; then
gh api "repos/${GITHUB_REPOSITORY}/statuses/${SHA}" \
-f state=success \
-f context=license/cla \
-f description="Skipped for maintainers" \
>/dev/null \
|| true
fi
sleep 10
done
gh api "repos/${GITHUB_REPOSITORY}/statuses/${SHA}" \
-f state=success \
-f context=license/cla \
-f description="Skipped for maintainers" \
>/dev/null