Skip to content

ci: watch DFHack releases and file a Copilot-assigned update issue - #2

Merged
alexanderolvera merged 2 commits into
mainfrom
feat/dfhack-release-watch
Jul 17, 2026
Merged

ci: watch DFHack releases and file a Copilot-assigned update issue#2
alexanderolvera merged 2 commits into
mainfrom
feat/dfhack-release-watch

Conversation

@alexanderolvera

Copy link
Copy Markdown
Owner

What

Adds .github/workflows/dfhack-release-watch.yml — a daily scheduled workflow that watches DFHack/dfhack for new stable releases and kicks off the update loop.

Flow

  1. Daily cron (14:17 UTC) + workflow_dispatch — polls DFHack's releases API, picks the latest non-prerelease, non-draft tag.
  2. Dedup — exact title match across open+closed issues. Existing issues are the state, so re-runs are safe and no external storage/secret is needed for this.
  3. File issue — scoped to this repo's real update surface: re-sync proto/*.proto from the new tag → npm run buildtypecheck/lintnpm test. Upstream release notes are folded in with @mentions neutralized so filing can't ping anyone.
  4. Assign Copilot coding agent via GraphQL → it opens the PR.

Auth

  • Issue creation uses the built-in GITHUB_TOKEN — no secret.
  • Copilot assignment uses COPILOT_ASSIGN_TOKEN (a fine-grained PAT with Issues: read/write, owned by a coding-agent seat holder). The automatic token can't assign the agent — github-actions[bot] has no seat.
  • Degrades gracefully: with no secret, step 4 emits a ::notice:: and exits 0 — the issue is still filed for manual assignment.

Testing

After merge: Actions → DFHack release watch → Run workflow. Delete the resulting test issue, or pre-create one titled Update for DFHack 53.15-r2 so dedup no-ops.

Cadence rationale

DFHack shipped ~23 stable releases over ~8 months (avg ~11 days apart), in bursts of several per week with occasional multi-week gaps. Daily polling catches each release within 24h without burning Actions minutes on a project that never releases faster than a couple per day.

🤖 Generated with Claude Code

Adds a daily scheduled workflow that polls DFHack/dfhack for new stable
releases. On a new tag with no existing tracking issue, it files one scoped
to re-syncing the vendored proto/*.proto files (build + test), then assigns
the Copilot coding agent so it opens a PR.

Existing issues are the dedup state, so the job is safe to re-run with no
external storage. Issue creation uses the built-in GITHUB_TOKEN; the
Copilot-assign step uses COPILOT_ASSIGN_TOKEN and degrades to a notice
(issue still filed) when the secret is absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 02:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a scheduled GitHub Actions workflow that polls DFHack’s upstream releases, files a per-release tracking issue in this repo when a new stable tag appears, and (optionally) assigns the Copilot coding agent to kick off the update PR loop.

Changes:

  • Add a daily cron + manual workflow_dispatch workflow to detect the latest non-draft, non-prerelease DFHack release.
  • Deduplicate by exact issue title and create a new tracking issue with embedded upstream release notes (with @mentions neutralized).
  • If COPILOT_ASSIGN_TOKEN is present, use GraphQL to assign the Copilot coding agent to the created issue.

Comment thread .github/workflows/dfhack-release-watch.yml
Comment thread .github/workflows/dfhack-release-watch.yml
Comment thread .github/workflows/dfhack-release-watch.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 17, 2026 02:22
@alexanderolvera
alexanderolvera merged commit 224ec1f into main Jul 17, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +63 to +65
# Exact-title match across open + closed issues (issues are the state).
found=$(gh issue list --state all --limit 200 --json title \
--jq "[.[].title] | index(\"Update for DFHack $TAG\")")
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