From d60109285576390848a3766caa48f322255af463 Mon Sep 17 00:00:00 2001 From: rtibblesbot Date: Wed, 16 Sep 2026 06:33:08 -0700 Subject: [PATCH] Migrate to the shared automation.yml entry point MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit learningequality/.github#88 flattens pull-request-target.yml into one reusable automation.yml and deletes the dispatcher the old caller used. .github/workflows/automation.yml is a verbatim copy of automation-template.yml from learningequality/.github. Never edit it locally — the on: block is generated as the union of every enabled automation, and central enable/disable lives in automation-registry.yml upstream. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/automation.yml | 52 +++++++++++++++++++ .../workflows/call-pull-request-target.yml | 11 ---- 2 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/automation.yml delete mode 100644 .github/workflows/call-pull-request-target.yml diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml new file mode 100644 index 00000000..aa524e20 --- /dev/null +++ b/.github/workflows/automation.yml @@ -0,0 +1,52 @@ +# This file is generated by scripts/generate-automation.js from automation-registry.yml. +# Do not edit it by hand - edit the registry and run: +# node scripts/generate-automation.js +# +# Caller template: copy this file to .github/workflows/automation.yml in a consumer repo. +# No edits are needed - the on: block is the exhaustive union of every enabled automation. + +name: Automation +on: + pull_request_target: + types: + - review_requested + - labeled + - opened + - assigned + - unassigned + - closed + - reopened + - edited + - review_request_removed + issue_comment: + types: + - created + issues: + types: + - opened + - reopened + - labeled + - unlabeled + - assigned + - unassigned + pull_request_review_comment: + types: + - created + schedule: + - cron: 1 0 * * 1 + workflow_dispatch: {} +permissions: + contents: write + pull-requests: write +jobs: + automation: + name: Run automations + uses: learningequality/.github/.github/workflows/automation.yml@main + secrets: + CONTRIBUTIONS_SHEET_NAME: ${{ secrets.CONTRIBUTIONS_SHEET_NAME }} + CONTRIBUTIONS_SPREADSHEET_ID: ${{ secrets.CONTRIBUTIONS_SPREADSHEET_ID }} + GH_UPLOADER_GCP_SA_CREDENTIALS: ${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }} + LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} + LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }} + SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/call-pull-request-target.yml b/.github/workflows/call-pull-request-target.yml deleted file mode 100644 index e499bcdd..00000000 --- a/.github/workflows/call-pull-request-target.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Handle pull request events -on: - pull_request_target: - types: [opened, review_requested, labeled] -jobs: - call-workflow: - name: Call shared workflow - uses: learningequality/.github/.github/workflows/pull-request-target.yml@main - secrets: - LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} - LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}