Skip to content

Conversation

@yugannkt
Copy link

@yugannkt yugannkt commented Dec 11, 2025

Motivation and Context

Adds a workflow that automatically comments on PRs when they're included in a release, notifying contributors their changes are live.

Approach

Custom workflow using GitHub's REST API:

  1. Triggers on release published
  2. Compares current and previous release tags
  3. Extracts PR numbers from commits
  4. Validates each is a merged PR (not an issue) via API
  5. Comments on each PR: "🎉 This pull request is included in v1.23.3!"

Key Features

Only comments on PRs (not issues) - API validation ensures this
Minimal permissions - only pull-requests: write required

How Has This Been Tested?

Tested with releases v1.23.2 → v1.23.3:

Fixes #1759

Breaking Changes

No, Its an non-breaking change which adds functionality

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

- Automatically comments on PRs included in a release
- Only comments on PRs (not issues) using GitHub API validation
- Compares current and previous release tags to find PRs
- Minimal permissions: only requires pull-requests:write

Fixes modelcontextprotocol#1759
@yugannkt
Copy link
Author

Ready for your review @maxisbey

@maxisbey maxisbey added enhancement Request for a new feature that's not currently supported P3 Nice to haves, rare edge cases labels Dec 11, 2025
@yugannkt
Copy link
Author

Ready for your review @felixweinberger

Copy link
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +17 to +18
with:
fetch-depth: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this anymore given we're now using the API only?

@felixweinberger
Copy link
Contributor

Ready for your review @felixweinberger

Thanks! Code LGTM, but curious how you tested this? Did you run this locally somehow to generate the PRs?

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

Labels

enhancement Request for a new feature that's not currently supported P3 Nice to haves, rare edge cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add workflow to comment on PRs when released (PRs only, not issues)

3 participants