Skip to content

feat: add automated commenting on linked issues when releases are published#323

Merged
lachlancollins merged 1 commit intoTanStack:mainfrom
KyleAMathews:add-issue-commenting
Dec 4, 2025
Merged

feat: add automated commenting on linked issues when releases are published#323
lachlancollins merged 1 commit intoTanStack:mainfrom
KyleAMathews:add-issue-commenting

Conversation

@KyleAMathews
Copy link
Contributor

Summary

Enhances the comment-on-release action to automatically notify both PRs and their linked issues when changes are released, matching the functionality from electric-sql/electric#3521.

Changes

  • Query linked issues: Uses GitHub's GraphQL API to find issues that each PR closes/fixes
  • Comment on issues: Posts release notifications on linked issues with package version info
  • Duplicate detection: Checks for existing comments to prevent spam if workflow runs multiple times
  • Enhanced permissions: Adds explicit issues: write permission to release workflow
  • Updated documentation: README reflects new issue commenting functionality

Example Comments

On a PR:

🎉 This PR has been released!

- [@tanstack/config@1.2.0](...)

Thank you for your contribution!

On a linked issue:

🎉 The PR fixing this issue (#123) has been released!

- [@tanstack/config@1.2.0](...)

Thank you for reporting!

How It Works

After commenting on PRs, the action:

  1. Queries GitHub's GraphQL API for issues closed by each PR
  2. Groups issues and tracks which PRs fixed them
  3. Posts a single consolidated comment per issue
  4. Checks for existing comments before posting to avoid duplicates

Test Plan

  • Verify GraphQL query correctly finds linked issues
  • Test duplicate comment detection
  • Confirm proper permissions in workflow
  • Validate comment formatting on both PRs and issues
  • Test with multiple packages affecting same PR/issue

🤖 Generated with Claude Code

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

⚠️ No Changeset found

Latest commit: 456472a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Dec 4, 2025

View your CI Pipeline Execution ↗ for commit 456472a

Command Status Duration Result
nx affected --targets=test:sherif,test:docs,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-04 23:50:27 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 4, 2025

npm i https://pkg.pr.new/@tanstack/eslint-config@323
npm i https://pkg.pr.new/@tanstack/publish-config@323
npm i https://pkg.pr.new/@tanstack/typedoc-config@323
npm i https://pkg.pr.new/@tanstack/vite-config@323

commit: 456472a

Copy link
Member

@lachlancollins lachlancollins left a comment

Choose a reason for hiding this comment

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

This is great, thanks @KyleAMathews !

…lished

Enhances the comment-on-release action to automatically notify both PRs and their linked issues when changes are released.

Key changes:
- Query GitHub GraphQL API to find issues closed/fixed by each PR
- Post release notifications on linked issues with package versions
- Add duplicate comment detection to prevent spam
- Add explicit `issues: write` permission to release workflow

This matches the functionality from electric-sql/electric#3521, ensuring both contributors and issue reporters are notified when their work ships.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@lachlancollins lachlancollins merged commit 99aaace into TanStack:main Dec 4, 2025
5 checks passed
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