diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 09561f9..fd00d90 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,2 @@ * @MichaelSaucier -# TLC 4.5 governance ownership -/.governance/tlc/ @MichaelSaucier -/.github/workflows/tlc-4.5.yml @MichaelSaucier diff --git a/.github/workflows/tlc-4.5.yml b/.github/workflows/tlc-4.5.yml deleted file mode 100644 index 2c9ba13..0000000 --- a/.github/workflows/tlc-4.5.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: TLC 4.5 - -on: - pull_request_target: - types: [opened, synchronize, reopened, ready_for_review, edited] - push: - branches: - - "main" - -permissions: - contents: read - issues: read - pull-requests: read - statuses: write - -jobs: - tlc-4-5: - if: github.event_name == 'pull_request_target' - uses: transpara-ai/.github/.github/workflows/tlc-4.5-reusable.yml@b67aa87c53cd818140407642961de5461c61e963 - with: - pr_number: ${{ github.event.pull_request.number }} - base_sha: ${{ github.event.pull_request.base.sha }} - head_sha: ${{ github.event.pull_request.head.sha }} - enforcement_mode: audit - workflow_commit: b67aa87c53cd818140407642961de5461c61e963 - activation_commit: 0057171a729566fd5d42a8147e8258d0928eb593 - - discover-base-prs: - if: github.event_name == 'push' - runs-on: ubuntu-latest - outputs: - prs: ${{ steps.open-prs.outputs.prs }} - steps: - - id: open-prs - shell: bash - env: - GH_TOKEN: ${{ github.token }} - TLC_REPOSITORY: ${{ github.repository }} - TLC_BASE_REF: ${{ github.ref_name }} - run: | - python3 - <<'PY' - import json - import os - import urllib.parse - import urllib.request - - repository = os.environ["TLC_REPOSITORY"] - base_ref = os.environ["TLC_BASE_REF"] - token = os.environ["GH_TOKEN"] - pulls = [] - page = 1 - while True: - query = urllib.parse.urlencode( - {"state": "open", "base": base_ref, "per_page": 100, "page": page} - ) - request = urllib.request.Request( - f"https://api.github.com/repos/{repository}/pulls?{query}", - headers={ - "Accept": "application/vnd.github+json", - "Authorization": f"Bearer {token}", - "X-GitHub-Api-Version": "2022-11-28", - }, - ) - with urllib.request.urlopen(request, timeout=30) as response: - rows = json.load(response) - if not isinstance(rows, list): - raise SystemExit("GitHub pull request response is not a list") - pulls.extend(rows) - if len(rows) < 100: - break - page += 1 - if len(pulls) > 256: - raise SystemExit("more than 256 open pull requests target the advanced base") - matrix = [ - { - "pr_number": int(pull["number"]), - "base_sha": pull["base"]["sha"], - "head_sha": pull["head"]["sha"], - } - for pull in sorted(pulls, key=lambda item: int(item["number"])) - ] - with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output: - output.write("prs=" + json.dumps(matrix, separators=(",", ":")) + "\n") - PY - - tlc-4-5-base-refresh: - needs: discover-base-prs - if: needs.discover-base-prs.outputs.prs != '[]' - strategy: - fail-fast: false - matrix: - pr: ${{ fromJSON(needs.discover-base-prs.outputs.prs) }} - uses: transpara-ai/.github/.github/workflows/tlc-4.5-reusable.yml@b67aa87c53cd818140407642961de5461c61e963 - with: - pr_number: ${{ matrix.pr.pr_number }} - base_sha: ${{ matrix.pr.base_sha }} - head_sha: ${{ matrix.pr.head_sha }} - enforcement_mode: audit - workflow_commit: b67aa87c53cd818140407642961de5461c61e963 - activation_commit: 0057171a729566fd5d42a8147e8258d0928eb593