Skip to content

feat(github): put issues reported against a beta on the release milestone - #184

Open
joostlek wants to merge 1 commit into
mainfrom
clanker/gallant-goodall-g0znqc
Open

joostlek wants to merge 1 commit into
mainfrom
clanker/gallant-goodall-g0znqc

Conversation

@joostlek

Copy link
Copy Markdown
Member

Proposed change

Issues reported against a beta should land on that release's milestone, so they're tracked for the release. Today that's done by hand, for example on home-assistant/core#195162.

This adds a beta-milestone rule, registered for core and frontend:

  • It runs when an issue is opened and on @home-assistant update.
  • It reads only the answer to "What version of Home Assistant Core has the issue?". Both the core and frontend bug templates ask that question.
  • When that answer is a beta build (2026.12.0b2, core-2026.12.0b2), it sets the matching open milestone (2026.12.0).
  • It does nothing when:
    • the version is a stable or dev build,
    • the issue already has a milestone, so a maintainer's choice wins,
    • the issue is closed,
    • no open milestone has that name, for example because the release already shipped.

Engine additions:

  • A setMilestone effect, applied through issues.update.
  • Issue.milestone(), seeded from the webhook payload and fetched from the API when the payload lacks it.
  • RuleContext.openMilestones(), which lists the repo's open milestones and caches them for the rest of the webhook event.

This is the first step towards posting newly reported beta issues to the Discord beta channel. A follow-up rule will listen to issues.milestoned, so issues milestoned by hand get posted too.

Type of change

  • Dependency upgrade
  • Bugfix
  • New rule or command
  • New repository manifest (enable the bot on another repo)
  • New feature (which adds functionality to an existing engine)
  • Code quality improvement or refactor (incl. tests)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:

Open points for review:

  • I couldn't check frontend's milestone names. If they don't follow core's YYYY.M.0 naming, the rule matches nothing there and does nothing.
  • The rule doesn't react when an issue is edited, because the engine doesn't handle issues.edited events yet. A reporter who corrects the version after opening the issue is only picked up by @home-assistant update.
  • No new GitHub App permissions or webhook events are needed. Listing milestones and setting one both fall under the Issues permission the app already has.

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass (mise run test). Your PR cannot be merged unless tests pass.
  • Lint and type checks pass (mise run check).
  • The code has been formatted (mise run format).
  • Tests have been added to verify that the new code works.
  • There is no commented out or debug code in this PR.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If behaviour, configuration, or environment variables changed:

  • README.md and .env.example have been updated accordingly.

Generated by Claude Code

…tone

Adds a beta-milestone rule for core and frontend. On issue open (and on
demand) it reads the "What version of Home Assistant Core has the issue?"
form field, and when that names a beta build (e.g. core-2026.12.0b2) it
sets the matching open release milestone (2026.12.0). Issues that already
have a milestone are left alone, and nothing happens when the milestone
isn't open.

Engine support: a setMilestone effect, Issue.milestone(), and a
per-dispatch cached RuleContext.openMilestones() read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SLHDn67HcX8nfhH55Vz6YF
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