Skip to content

Conversation

@avivkeller
Copy link
Member

@avivkeller avivkeller commented Oct 22, 2025

Fixes the following with the release blog post generator:

  1. Set the working directory, as otherwise it'll use turbo (and not correctly pass the $VERSION argument
  2. Apparently, we need to pass GITHUB_TOKEN explicitly to this action (https://github.com/gr2m/create-or-update-pull-request-action/blob/master/index.js#L15), and it needs a bit more permissions
  3. In nodejs/node, the version will be passed as vX.Y.Z format, and the script is currently only equipped to handle X.Y.Z format
  4. We want the script to throw an error when it fails, as to disrupt the workflow run.

Sorry that this ended up being two PRs! You can't test a workflow_dispatch trigger before it's merged into the main branch.

Successful Run: https://github.com/nodejs/nodejs.org/actions/runs/18730461924
Example PR: #8260 (The content of this PR looks like it doesn't do anything, but it generated a release post identical to that of main, hence why the file diff didn't incldue it)

@Copilot Copilot AI review requested due to automatic review settings October 22, 2025 21:27
@avivkeller avivkeller requested review from a team as code owners October 22, 2025 21:27
@vercel
Copy link

vercel bot commented Oct 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Oct 22, 2025 9:34pm

Copy link
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

This PR fixes several issues in the release blog post generator workflow and script to properly handle version arguments and error reporting.

Key Changes:

  • Updated argument parsing to use parseArgs instead of manual process.argv manipulation
  • Added support for version strings in vX.Y.Z format by stripping the leading 'v'
  • Configured the workflow to pass GITHUB_TOKEN explicitly and set the correct working directory

Reviewed Changes

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

File Description
apps/site/scripts/release-post/index.mjs Replaced manual argument parsing with parseArgs API, added version format normalization, and removed error suppression
.github/workflows/create-release-post.yml Added working directory configuration and explicit GITHUB_TOKEN passing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.57%. Comparing base (ad86795) to head (e06b92f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8259   +/-   ##
=======================================
  Coverage   76.57%   76.57%           
=======================================
  Files         117      117           
  Lines        9733     9733           
  Branches      329      329           
=======================================
  Hits         7453     7453           
  Misses       2278     2278           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avivkeller
Copy link
Member Author

Sorry that this ended up being two PRs! You can't test a workflow_dispatch trigger before it's merged into the main branch.

Successful Run: https://github.com/nodejs/nodejs.org/actions/runs/18730461924
Example PR: #8260

@bmuenzenmeyer
Copy link
Collaborator

@avivkeller I wanted to share https://github.com/github/local-action - I recently discovered this and found it useful - it sorta depends on how a workflow is constructed, but it is more lightweight than https://github.com/nektos/act

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