Title: Consolidate shared workflows into a single generated automation.yml entry point · Issue #86 · learningequality/.github · GitHub
Open Graph Title: Consolidate shared workflows into a single generated automation.yml entry point · Issue #86 · learningequality/.github
X Title: Consolidate shared workflows into a single generated automation.yml entry point · Issue #86 · learningequality/.github
Description: ❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. Overview Replace the per-feature call-*.yml caller workflows that every consuming repo must...
Open Graph Description: ❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. Overview Replace the per-feature call-*.yml caller ...
X Description: ❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. Overview Replace the per-feature call-*.yml caller ...
Opengraph URL: https://github.com/learningequality/.github/issues/86
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consolidate shared workflows into a single generated automation.yml entry point","articleBody":"\u003c!---HEADER START-->\n\n\u003cimg height=\"20px\" src=\"https://i.imgur.com/c7hUeb5.jpeg\">\n\n❌ **This issue is not open for contribution. Visit \u003ca href=\"https://learningequality.org/contributing-to-our-open-code-base/\" target=\"_blank\">Contributing guidelines\u003c/a>** to learn about the contributing process and how to find suitable issues.\n\n\u003cimg height=\"20px\" src=\"https://i.imgur.com/c7hUeb5.jpeg\">\n\n\u003c!---HEADER END-->\n\n## Overview\n\nReplace the per-feature `call-*.yml` caller workflows that every consuming repo must copy with a **single `automation.yml` reusable workflow** in this repo, fronted by one thin, generated caller each repo copies once. All event routing and on/off control moves centrally into `.github`; consumers carry only an exhaustive `on:` block and a single `uses:` job.\n\n**Complexity:** High\n**Target branch:** main\n\n### Context\n\nRepos that consume our shared automations (studio, kolibri, …) copy ~7 caller workflows into `.github/workflows/`, each with its own `on:` trigger and exhaustive `types:` list, each `uses:`-ing a reusable workflow:\n\n| Caller (copied per repo) | `on:` | Reusable workflow |\n|---|---|---|\n| `call-pull-request-target.yml` | `pull_request_target: [opened, review_requested, labeled]` | `pull-request-target.yml` (dispatcher → review-requested / pull-request-label / dependabot-reviewer) |\n| `call-contributor-issue-comment.yml` | `issue_comment: [created]` | `contributor-issue-comment.yml` |\n| `call-contributor-pr-reply.yml` | `pull_request_target: [opened]` | `contributor-pr-reply.yml` |\n| `call-holiday-message.yml` | `pull_request_target: [opened]` + `issue_comment: [created]` | `holiday-message.yml` |\n| `call-manage-issue-header.yml` | `issues: [opened, reopened, labeled, unlabeled]` | `manage-issue-header.yml` |\n| `call-update-pr-spreadsheet.yml` | `pull_request_target: [assigned, unassigned, opened, closed, reopened, edited, review_requested, review_request_removed]` | `update-pr-spreadsheet.yml` |\n| `community-contribution-labeling.yml` | `issues: [assigned, unassigned]` | `community-contribution-label.yml` |\n| `unassign-inactive.yaml` | `schedule` + `workflow_dispatch` | `unassign-inactive-issues.yaml` |\n| (no caller yet) | `pull_request_review_comment` | `resolve_bot_pr_threads.yml` |\n\nProblems:\n- Adding/removing/toggling an automation is a change in **every** consumer repo.\n- The `types:` lists drift and are easy to get wrong: a default `pull_request_target` trigger fires only on `opened, reopened, synchronize` and silently misses `labeled`, `review_requested`, `assigned`, etc.\n\n**Hard constraint — 4-level reusable-workflow nesting cap.** The existing chain `repo caller → pull-request-target.yml → review-requested.yml → is-contributor.yml` is already at the GitHub maximum of 4. A new `automation.yml` therefore cannot sit *on top of* the current dispatcher (that would be 5). It must **flatten** the dispatch — call leaf workflows directly, absorbing `pull-request-target.yml`'s `action`-based routing — giving `repo caller → automation.yml → leaf → is-contributor` (4).\n\n### The Change\n\nIntroduce one reusable `automation.yml` as the single integration point, generated from a declarative registry that is the source of truth for which events each automation listens to.\n\n**Components:**\n\n1. **`automation.yml`** (reusable, `workflow_call`) — one job per automation, each guarded by an `if:` on event/action, each `uses:`-ing a leaf workflow. Absorbs the routing currently in `pull-request-target.yml` (review-requested / pull-request-label / dependabot-reviewer become direct jobs). Enabling/disabling an automation org-wide is a one-line edit here.\n\n2. **Registry** (single source of truth) — one entry per automation declaring: leaf workflow file, trigger events + `types:`, the dispatch `if:` condition, the secrets it needs, and an `enabled` flag.\n\n3. **Generator script** — reads the registry and writes both `automation.yml`'s jobs and the caller template's `on:` block, between generated markers.\n\n4. **Caller template** consumers copy — the generated **exhaustive `on:` block** (the union of every enabled automation's events/types — the part a consumer can't reliably hand-maintain) plus a single job `uses:`-ing `automation.yml`.\n\n**Secrets: explicit, not inherited.** `automation.yml` declares every secret in `workflow_call.secrets` with `required:` set (bot-app credentials required; Slack/spreadsheet/GCP optional) and forwards each explicitly to the leaf that needs it. The caller passes secrets explicitly. This keeps it validated and explicit about which secrets each automation depends on, rather than silently forwarding everything with `secrets: inherit`.\n\n**Migration is a hard cutover:** once `automation.yml` and the template exist, the obsolete `call-*.yml` and `pull-request-target.yml` are deleted from `.github`, and each consumer repo swaps its callers for the single copied template in one go.\n\n### Out of Scope\n\n- Changing the internal logic of leaf workflows (`review-requested.yml`, `is-contributor.yml`, `contributor-issue-comment.yml`, etc.) — they are called as-is.\n- `pr-statistics.yml` — org-internal scheduled workflow, not part of the per-repo entry point.\n- Changing automation behavior (what each script does); this is a routing/packaging consolidation only.\n\n### Acceptance Criteria\n\n#### Central workflow\n- [ ] A reusable `automation.yml` (`workflow_call`) exists in `.github`, with one job per current automation, each guarded by an `if:` on event/action and calling its leaf workflow directly.\n- [ ] The `action`-based routing currently in `pull-request-target.yml` (review-requested / pull-request-label / dependabot-reviewer) is folded into `automation.yml` as direct jobs.\n- [ ] No call chain exceeds GitHub's 4-level reusable-workflow limit (`caller → automation.yml → leaf → is-contributor`).\n- [ ] `automation.yml` declares every secret in `workflow_call.secrets` with correct `required:` flags (bot-app credentials required; Slack/spreadsheet/GCP optional) and forwards each explicitly to the leaf that uses it — no `secrets: inherit`.\n- [ ] Seasonal/optional automations (e.g. holiday-message) are enabled/disabled centrally via the registry, with no per-repo toggle.\n- [ ] Obsolete `call-*.yml` and `pull-request-target.yml` are removed from `.github`; leaf workflows remain.\n\n#### Registry & generation\n- [ ] A declarative registry is the single source of truth, with one entry per automation listing: leaf workflow file, trigger events + `types:`, dispatch `if:` condition, required/optional secrets, and an `enabled` flag.\n- [ ] A generator produces `automation.yml`'s jobs and the caller template's `on:` block from the registry.\n- [ ] The caller template's `on:` block is the exhaustive union of every enabled automation's events and `types:`.\n- [ ] A pre-commit hook (run via `prek`) regenerates and fails on drift between the registry and the generated files.\n- [ ] A CI workflow runs `prek` against the repo (it has `.pre-commit-config.yaml` but no CI lint check today), matching other learningequality repos.\n\n#### Migration & cutover\n- [ ] Org-wide search for `learningequality/.github/.github/workflows/...` references is re-run at execution time to confirm the consumer set below is complete.\n- [ ] Org secret visibility is verified to cover every consumer repo (required for explicit secret resolution).\n- [ ] A migration PR is prepared for each consumer repo, removing all existing callers and adding the single copied template:\n - [ ] `kolibri`\n - [ ] `studio`\n - [ ] `ricecooker`\n - [ ] `kolibri-design-system`\n - [ ] `le-utils`\n - [ ] `kolibri-installer-android`\n - [ ] `kolibri-app`\n - [ ] `kolibri-installer-debian`\n - [ ] `kolibri-image-pi`\n - [ ] `kolibri-data-portal`\n- [ ] All migration PRs are open and ready before any are merged (minimal-downtime cutover).\n- [ ] After cutover, each event type triggers the same automation it did before (functional parity per automation).\n\n#### Documentation\n- [ ] Docs describe the single entry point, how to onboard a new repo (copy the template), and how to add/toggle an automation (edit the registry, regenerate).\n\n### Testing\n\n- Run `prek` and confirm the generation hook regenerates cleanly, then edit the registry without regenerating and confirm the hook fails on drift; confirm the new CI workflow runs `prek` and reports the same.\n- Exercise the migrated caller in one consumer first (e.g. `studio`): open/label/assign a PR, comment on an issue, and confirm each automation fires exactly as it did pre-migration (review request, label handling, dependabot reviewer, spreadsheet update, issue header, community label, holiday when enabled).\n- Confirm the 4-level nesting holds — `automation.yml`'s jobs that reach `is-contributor.yml` run without GitHub's \"maximum workflow nesting\" error.\n- Confirm explicit secrets resolve: a repo missing optional secrets (Slack/spreadsheet/GCP) still runs the automations that don't need them, and required bot-app secrets fail loudly if absent.\n\n### References\n\n- Reusable workflows & the 4-level nesting limit: https://docs.github.com/en/actions/sharing-automations/reusing-workflows\n- Passing secrets to reusable workflows (`required`, explicit forwarding): https://docs.github.com/en/actions/sharing-automations/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow\n- `prek` (pre-commit runner): https://github.com/j178/prek\n- Existing dispatcher being flattened: `.github/workflows/pull-request-target.yml`\n- Consumer inventory captured from org code search (this repo, 2026-06-15)\n\n## AI usage\n\nDrafted with Claude Code from a verbal description of the desired architecture. The author directed the design decisions (single entry point, declarative registry + generator, explicit secrets over `secrets: inherit`, hard cutover, pre-commit + CI enforcement). Claude inspected the current workflows, identified the 4-level nesting constraint, ran the org-wide consumer search, and assembled the issue section by section under review. All claims (workflow inventory, consumer list, nesting limit) were verified against the repo and GitHub before inclusion.\n","author":{"url":"https://github.com/rtibbles","@type":"Person","name":"rtibbles"},"datePublished":"2026-06-16T00:39:30Z","url":"https://github.com/learningequality/.github/issues/86"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6b292989-c227-65db-0cdb-824e570bd0d9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8E0:37BEAD:1937C1D:2209B63:6AFFF797 |
| html-safe-nonce | a1148a04a23b2a41de7b010b726f2bdc7052a9723a13e40ea9f2c4fee5b64d38 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEUwOjM3QkVBRDoxOTM3QzFEOjIyMDlCNjM6NkFGRkY3OTciLCJ2aXNpdG9yX2lkIjoiNTkyNDU3MjA3NDIzNTM5Mzk0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f3c413320a9369947d70f454ed2d9548e7b3d7dc42ac629bdd2d12d843a37b67 |
| hovercard-subject-tag | issue:4670016665 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/learningequality/.github/86/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4d4b5bd1d3982baeac27b6013ad0d8cd99966778d8a60a2090211eaa14228f80/learningequality/.github/issues/86 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4d4b5bd1d3982baeac27b6013ad0d8cd99966778d8a60a2090211eaa14228f80/learningequality/.github/issues/86 |
| og:image:alt | ❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. Overview Replace the per-feature call-*.yml caller ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rtibbles |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/learningequality/.github git https://github.com/learningequality/.github.git |
| octolytics-dimension-user_id | 3926525 |
| octolytics-dimension-user_login | learningequality |
| octolytics-dimension-repository_id | 647407699 |
| octolytics-dimension-repository_nwo | learningequality/.github |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 647407699 |
| octolytics-dimension-repository_network_root_nwo | learningequality/.github |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width