Skip to content

fix: link release checklist in release PR workflow#3802

Open
hiSandog wants to merge 2 commits intofaker-js:nextfrom
hiSandog:fix/release-pr-checklist-20260411
Open

fix: link release checklist in release PR workflow#3802
hiSandog wants to merge 2 commits intofaker-js:nextfrom
hiSandog:fix/release-pr-checklist-20260411

Conversation

@hiSandog
Copy link
Copy Markdown
Contributor

Summary

  • replace the placeholder release checklist TODO in the release PR workflow
  • look up the current open c: release issue and include its URL when present
  • omit the checklist section when no release checklist issue is open

Validation

  • pnpm exec prettier --check .github/workflows/prepare-release-pr.yml

@hiSandog hiSandog requested a review from a team as a code owner April 11, 2026 08:00
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 11, 2026

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d1ea36b
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/69dc52ac7b20060008dda208
😎 Deploy Preview https://deploy-preview-3802.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.83%. Comparing base (e765b6b) to head (d1ea36b).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3802      +/-   ##
==========================================
- Coverage   98.89%   98.83%   -0.07%     
==========================================
  Files         894      894              
  Lines        3087     3086       -1     
  Branches      564      564              
==========================================
- Hits         3053     3050       -3     
- Misses         30       32       +2     
  Partials        4        4              

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Apr 11, 2026

Cool idea. How does this behave if the release checklist issue does not exist yet?

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: infra Changes to our infrastructure or project setup labels Apr 11, 2026
@ST-DDT ST-DDT added this to the vAnytime milestone Apr 11, 2026
@hiSandog
Copy link
Copy Markdown
Contributor Author

Good question! If the release checklist issue does not exist yet, gh issue list returns an empty array, so RELEASE_CHECKLIST_URL becomes an empty string. The if [ -n "$RELEASE_CHECKLIST_URL" ] guard then skips the checklist section entirely — the PR body just contains the release version and the manual tasks checkbox, with no broken or placeholder link.

In practice, the checklist issue is created as part of the release prep process (it is an issue labeled c: release), so by the time the release PR workflow runs, the issue should already exist. But even if it does not, the workflow handles it gracefully without errors.

@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Apr 11, 2026

Should we cancel/fail the process instead?
@faker-js/maintainers What do you think?

Copy link
Copy Markdown
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

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

Should we cancel/fail the process instead?
@faker-js/maintainers What do you think?

Usually I would be in favor of failing the PR creation, because not having a release issue would mean that someone is fundamentally going against our internal release process.
But since that would require reverting all other steps as well, which would increase the complexity of the workflow file more that we gain from the change, I'd say that we simply default to the old text inside the jq expression (see https://github.com/faker-js/faker/pull/3802/changes#r3069395214).
By doing that, the instantiation of the PR_BODY variable should also be more straight forward, since RELEASE_CHECKLIST_URL should not be empty anymore.


Does this change evaluate to incorrect issue numbers if we ever forget to close an old release issue? I don't think that this is worth addressing if it does, since the chance of this happening is very slim. I'm just curious if it would. I guess it wouldn't due to the --limit 1 and/or the default sort order being "newest first" 🤔


- name: Create draft PR
run: |
RELEASE_CHECKLIST_URL="$(gh issue list --label 'c: release' --state open --limit 1 --json url --jq '.[0].url // ""')"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is where I would default to the old text.

Suggested change
RELEASE_CHECKLIST_URL="$(gh issue list --label 'c: release' --state open --limit 1 --json url --jq '.[0].url // ""')"
RELEASE_CHECKLIST_URL="$(gh issue list --label 'c: release' --state open --limit 1 --json url --jq '.[0].url // "TODO add link to issue"')"

@hiSandog
Copy link
Copy Markdown
Contributor Author

@xDivisionByZerox Good call! Applied your suggestion — the jq expression now defaults to "TODO add link to issue" instead of an empty string, which simplifies the PR_BODY construction by removing the if/else guard entirely. Pushed in d1ea36b.

Comment on lines +75 to +79
- [ ] Completed manual changes/tasks for this release

---
---

- Checklist: TODO add link to issue
"
- Checklist: $RELEASE_CHECKLIST_URL"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please retain the original indentation here, as it gets reflected in the final PR description.

Suggested change
- [ ] Completed manual changes/tasks for this release
---
---
- Checklist: TODO add link to issue
"
- Checklist: $RELEASE_CHECKLIST_URL"
- [ ] Completed manual changes/tasks for this release
---
- Checklist: $RELEASE_CHECKLIST_URL
"

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

Labels

c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants