From 87f60616af185d641a00693522078e2e3b7b6814 Mon Sep 17 00:00:00 2001 From: rtibblesbot Date: Wed, 16 Sep 2026 07:00:01 -0700 Subject: [PATCH] Replace seven automation callers with the central entry point MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copy `automation-template.yml` from learningequality/.github verbatim to `.github/workflows/automation.yml`; routing now lives in the central reusable `automation.yml`, not in per-automation callers here. Trigger parity verified against the deleted callers: the only addition is `pull_request_review_comment: created`, no event or type is lost. The same seven secrets are passed. Merge only after learningequality/.github#88 — the copy calls `automation.yml@main`, which does not exist until that lands. Refs #6135 Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/automation.yml | 52 +++++++++++++++++++ .../call-contributor-issue-comment.yml | 17 ------ .../workflows/call-contributor-pr-reply.yml | 16 ------ .../workflows/call-manage-issue-header.yml | 16 ------ .../workflows/call-pull-request-target.yml | 15 ------ .../workflows/call-update-pr-spreadsheet.yml | 18 ------- .../community-contribution-labeling.yml | 15 ------ .github/workflows/unassign-inactive.yaml | 18 ------- 8 files changed, 52 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/automation.yml delete mode 100644 .github/workflows/call-contributor-issue-comment.yml delete mode 100644 .github/workflows/call-contributor-pr-reply.yml delete mode 100644 .github/workflows/call-manage-issue-header.yml delete mode 100644 .github/workflows/call-pull-request-target.yml delete mode 100644 .github/workflows/call-update-pr-spreadsheet.yml delete mode 100644 .github/workflows/community-contribution-labeling.yml delete mode 100644 .github/workflows/unassign-inactive.yaml diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml new file mode 100644 index 0000000000..aa524e20cb --- /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-contributor-issue-comment.yml b/.github/workflows/call-contributor-issue-comment.yml deleted file mode 100644 index a47ee7b28d..0000000000 --- a/.github/workflows/call-contributor-issue-comment.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Handle contributor comment on GitHub issue - -on: - issue_comment: - types: [created] - -permissions: - contents: read - -jobs: - call-workflow: - uses: learningequality/.github/.github/workflows/contributor-issue-comment.yml@main - secrets: - LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} - LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }} diff --git a/.github/workflows/call-contributor-pr-reply.yml b/.github/workflows/call-contributor-pr-reply.yml deleted file mode 100644 index ac84d3db82..0000000000 --- a/.github/workflows/call-contributor-pr-reply.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Send reply on a new contributor pull request -on: - pull_request_target: - types: [opened] - -permissions: - contents: read - -jobs: - call-workflow: - name: Call shared workflow - uses: learningequality/.github/.github/workflows/contributor-pr-reply.yml@main - secrets: - 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 }} diff --git a/.github/workflows/call-manage-issue-header.yml b/.github/workflows/call-manage-issue-header.yml deleted file mode 100644 index c511eef0b2..0000000000 --- a/.github/workflows/call-manage-issue-header.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Manage issue header - -on: - issues: - types: [opened, reopened, labeled, unlabeled] - -permissions: - contents: read - -jobs: - call-workflow: - name: Call shared workflow - uses: learningequality/.github/.github/workflows/manage-issue-header.yml@main - secrets: - LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} - LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }} diff --git a/.github/workflows/call-pull-request-target.yml b/.github/workflows/call-pull-request-target.yml deleted file mode 100644 index d3cc282b91..0000000000 --- a/.github/workflows/call-pull-request-target.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Handle pull request events -on: - pull_request_target: - types: [opened, review_requested, labeled] - -permissions: - contents: read - -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 }} diff --git a/.github/workflows/call-update-pr-spreadsheet.yml b/.github/workflows/call-update-pr-spreadsheet.yml deleted file mode 100644 index 5972bbc785..0000000000 --- a/.github/workflows/call-update-pr-spreadsheet.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Update community pull requests spreadsheet -on: - pull_request_target: - types: [assigned, unassigned, opened, closed, reopened, edited, review_requested, review_request_removed] - -permissions: - contents: read - -jobs: - call-workflow: - name: Call shared workflow - uses: learningequality/.github/.github/workflows/update-pr-spreadsheet.yml@main - secrets: - LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} - LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }} - CONTRIBUTIONS_SPREADSHEET_ID: ${{ secrets.CONTRIBUTIONS_SPREADSHEET_ID }} - CONTRIBUTIONS_SHEET_NAME: ${{ secrets.CONTRIBUTIONS_SHEET_NAME }} - GH_UPLOADER_GCP_SA_CREDENTIALS: ${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }} diff --git a/.github/workflows/community-contribution-labeling.yml b/.github/workflows/community-contribution-labeling.yml deleted file mode 100644 index 57953db099..0000000000 --- a/.github/workflows/community-contribution-labeling.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Community Contribution Label - -on: - issues: - types: [assigned, unassigned] - -permissions: - contents: read - -jobs: - call-label-action: - uses: learningequality/.github/.github/workflows/community-contribution-label.yml@main - secrets: - LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} - LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }} diff --git a/.github/workflows/unassign-inactive.yaml b/.github/workflows/unassign-inactive.yaml deleted file mode 100644 index 78f2e110b4..0000000000 --- a/.github/workflows/unassign-inactive.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Unassign Inactive Contributors" -run-name: Unassign Inactive Contributors - -on: - schedule: - - cron: "1 0 * * 1" # Every Monday at 00:01 UTC - workflow_dispatch: - -permissions: - contents: read - -jobs: - unassign-inactive: - uses: learningequality/.github/.github/workflows/unassign-inactive-issues.yaml@main - secrets: - 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 }}