Skip to content

Revival generator: reusable workflow opens tracking issue + phase sub-issues in the module repo - #16

Open
tablackburn wants to merge 20 commits into
mainfrom
revival-generator
Open

tablackburn wants to merge 20 commits into
mainfrom
revival-generator

Conversation

@tablackburn

@tablackburn tablackburn commented Sep 14, 2026

Copy link
Copy Markdown

What

A reusable workflow that starts a module revival: one [REVIVAL] <Module> tracking issue plus six phase sub-issues, generated from markdown in docs/revival/ and opened in the module repo, where contributors look. First consumer: BuildHelpers.

This is the "make the template actually useful" work from the Discord thread. Instead of copying draft issues from a project template (whose checkboxes are not interactive), the checklist lives in git and the workflow opens real issues from it.

Files

Path Purpose
.github/workflows/revival-start.yml workflow_call. Inputs: steward, module (defaults to the calling repo's name), source_ref. The caller snippet is in the file header
scripts/create-revival.js ~105 lines of actions/github-script. No dependencies, no secrets. Runs on the caller's GITHUB_TOKEN with issues: write, same pattern as powershell-ci.yml
docs/revival/tracking.md Tracking issue body with a baseline table the workflow pre-fills from the repo (stars, forks, last push, open issues/PRs, CI)
docs/revival/phase-0.mdphase-5.md One file per sub-issue. Frontmatter: title, labels, type, role. 47 checkboxes total, outcome-shaped
docs/revival/labels.yml Label manifest for revived repos (8 labels + prune list). type: uses org Issue Types, priority: uses the org Issue Field

How a Steward uses it

Drop a ten-line caller into the module repo (snippet in the workflow header), run it from the Actions tab with their login as steward. Issues, types, assignment, and the baseline table appear in the module repo.

Behaviour

  • Idempotent: re-running for the same module finds the existing tracking issue and stops.
  • Sets Issue Type Task on every issue and assigns the Steward when given.
  • Creates the revival label if missing.
  • Sub-issues attach via the sub-issues API, so the tracking issue gets the native progress rollup.
  • Shape borrowed from cncf/sandbox's onboarding generator.

Verified on two scratch repos in the psake org: the reusable workflow in one, a caller in the other. Issues landed in the caller repo with type, assignee, baseline, and sub-issue rollup; a re-run created nothing.

Board

Per-revival project boards (as with #6 and #7). Add the tracking issue to the board; with "auto-add sub-issues" enabled on the project the six phases follow. Board's Start Here view should filter on label:"good first issue", the string GitHub's contributor discovery indexes; project fields are invisible to it.

Follow-ups (separate PRs)

  • Rewrite docs/revival-playbook.md as the reference doc these issues link to: comment templates, PR decision tree, CI/release YAML, release steps, cadence. Its Phase 1 label table is superseded by labels.yml.
  • Repo provisioning script (labels, status-incoming, branch protection, and the caller workflow file).
  • maintainer-onboarding.md says "open a tracking issue in the .github repo"; that line changes to the module repo.

🤖 Generated with Claude Code

https://claude.ai/code/session_01StfaUPLixY3We2bfe1fiNE

@tablackburn tablackburn changed the title Revival generator: tracking issue + phase sub-issues from docs/revival/ Revival generator: reusable workflow opens tracking issue + phase sub-issues in the module repo Sep 17, 2026
tablackburn added a commit to PowerShellOrg/BuildHelpers that referenced this pull request Sep 17, 2026
@tablackburn
tablackburn marked this pull request as ready for review September 17, 2026 19:27
Copilot AI lite review requested due to automatic review settings September 17, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The baseline falsely reports GitHub Actions when only the launcher exists, and partial failures cannot be recovered on rerun.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a reusable workflow and generator that create module-local revival tracking issues and six phase sub-issues from Markdown templates.

Changes:

  • Adds workflow inputs, permissions, and caller instructions.
  • Generates baseline metrics, labels, assignments, types, and sub-issue relationships.
  • Adds revival templates and label definitions.
File summaries
File Description
.github/workflows/revival-start.yml Reusable revival workflow
scripts/create-revival.js Issue generation and baseline logic
docs/revival/tracking.md Tracking issue template
docs/revival/phase-0.md Inventory phase
docs/revival/phase-1.md Issue triage phase
docs/revival/phase-2.md PR triage phase
docs/revival/phase-3.md Build modernization phase
docs/revival/phase-4.md First release phase
docs/revival/phase-5.md Transition phase
docs/revival/labels.yml Revival label manifest
Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/create-revival.js Outdated
Comment on lines +34 to +36
for (const [p, name] of [['.github/workflows', 'GitHub Actions'], ['appveyor.yml', 'AppVeyor'], ['azure-pipelines.yml', 'Azure Pipelines'], ['.travis.yml', 'Travis']]) {
try { await github.rest.repos.getContent({ owner, repo, path: p }); ci.push(name); } catch (e) { if (e.status !== 404) throw e; }
}
Comment thread scripts/create-revival.js Outdated
Comment on lines +82 to +86
const existing = await findExisting(github, owner, repo, title);
if (existing) {
core.summary.addRaw(`Tracking issue already exists: [#${existing.number}](${existing.html_url}) (${existing.state}). Nothing created.`).write();
core.setOutput('tracking_issue', existing.number);
return;
@tablackburn

Copy link
Copy Markdown
Author

Addressed both Copilot findings in the latest commit:

  • Baseline: .github/workflows is now inspected for workflow files other than the caller, and the last-commit date skips commits that only touch the caller file. Verified on a scratch repo where the caller is the only workflow: Existing CI reads none.
  • Partial failure: the run is now find-or-create per issue plus ensure-attached per phase, so a re-run after a partial failure completes the set. Verified by detaching one phase and renaming another, then re-running: one re-attached, one recreated, summary reports Reconciled (1 created, 2 attached).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants