Skip to content

Assign Prototype Milestone โ€‹

Workflow: assign-milestone.yml
Status: โœ… Active


Overview โ€‹

Automatically assigns the Prototype milestone to every new GitHub issue so nothing falls through the cracks. A workflow_dispatch trigger lets you backfill all existing open issues at any time.


What It Does โ€‹

Triggers โ€‹

TriggerBehavior
issues: openedAssigns "Prototype" milestone to the new issue (skips if already set)
workflow_dispatchBackfills all open issues that currently have no milestone

Logic โ€‹

New issue opened
  โ†“
Does it already have a milestone? โ†’ YES โ†’ skip
  โ†“ NO
Assign "Prototype" milestone
workflow_dispatch (backfill)
  โ†“
Get or create "Prototype" milestone
  โ†“
Paginate all open issues
  โ†“ (for each)
Has milestone? โ†’ YES โ†’ skip
  โ†“ NO
Assign "Prototype" milestone
  โ†“
Report summary

If the "Prototype" milestone does not exist, the workflow creates it automatically before assigning.


Running the Backfill โ€‹

Via GitHub UI โ€‹

  1. Go to Actions โ†’ Assign Prototype Milestone
  2. Click Run workflow
  3. Options:
    • Backfill: true (default) โ€” processes all open issues
    • Dry-run: true โ€” preview without making changes
  4. Click Run workflow

Via gh CLI โ€‹

bash
# Preview changes (dry-run)
gh workflow run assign-milestone.yml \
  -f backfill=true \
  -f dry_run=true

# Apply changes
gh workflow run assign-milestone.yml \
  -f backfill=true \
  -f dry_run=false

Milestone Lifecycle โ€‹

PhaseAction
Prototype (current)All new issues assigned here automatically
Future milestoneUpdate MILESTONE_NAME env var in the workflow, or configure GITHUB_MILESTONE_NAME in the Discord bot (.env)
Post-launchChange the default milestone name or remove auto-assignment

Changing the Default Milestone โ€‹

Two places to update when moving to a new milestone:

  1. assign-milestone.yml โ€” change MILESTONE_NAME: "Prototype" to the new name
  2. Discord bot โ€” set GITHUB_MILESTONE_NAME=NewMilestoneName in the bot's .env

Configuration โ€‹

VariableDefaultDescription
MILESTONE_NAME"Prototype"Name of the milestone to assign
DRY_RUNfalsePreview mode (no API writes)
GH_PAT secretFalls back to GITHUB_TOKENToken for API calls; use a PAT if github.token lacks milestone write permission

Permissions โ€‹

The workflow requests issues: write which is sufficient to update milestone assignments using the default GITHUB_TOKEN. No additional secrets are required for standard repos.


  • Discord bot (services/bots/discord/bot.js) โ€” also assigns "Prototype" milestone to issues created via Discord slash commands (GITHUB_MILESTONE_NAME env var)
  • Issue #81 โ€” original task that requested this workflow
  • Issue #299 โ€” bulk backfill task that prompted the workflow_dispatch trigger

Built with VitePress