Skip to content

Fetch latest PR body during marketplace submission#636

Closed
huntercaron wants to merge 1 commit into
mainfrom
fix/latest-pr-body-on-merge
Closed

Fetch latest PR body during marketplace submission#636
huntercaron wants to merge 1 commit into
mainfrom
fix/latest-pr-body-on-merge

Conversation

@huntercaron
Copy link
Copy Markdown
Collaborator

Description

This pull request updates the auto-submit-on-merge flow so reruns fetch the latest pull request description inside scripts/submit-on-merge.ts, instead of relying on the cached event payload written by the workflow.

Changelog

  • Marketplace auto-submit now resolves the latest PR body at runtime before extracting the changelog.
  • The workflow now passes the PR number to the script and grants explicit PR read permission.

Testing

  • yarn test:scripts
  • yarn exec tsc --noEmit --pretty false --skipLibCheck --module ESNext --moduleResolution bundler --target ES2023 --lib ES2023,DOM,DOM.Iterable scripts/submit-on-merge.ts

Copilot AI review requested due to automatic review settings April 29, 2026 12:53
@github-actions github-actions Bot added the Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging label Apr 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the marketplace auto-submit-on-merge flow to fetch the latest pull request body at runtime (rather than relying on the workflow event payload), ensuring reruns extract the current changelog.

Changes:

  • Added runtime PR body resolution via GitHub REST API in scripts/submit-on-merge.ts (with file fallback).
  • Converted the submit-on-merge runner to async to support awaiting the PR body fetch.
  • Updated the workflow to pass PR_NUMBER and grant pull-requests: read permission (and explicit token permissions).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/submit-on-merge.ts Fetches the latest PR body from GitHub API before extracting the changelog; updates execution flow to async.
.github/workflows/submit-on-merge.yml Removes cached PR-body file writing, passes PR number to the script, and adds explicit token permissions for PR reads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants