Skip to content

chore(docs): add script to generate versions.md in dynamic plugins doc #2808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 26, 2025

Conversation

kadel
Copy link
Member

@kadel kadel commented Apr 25, 2025

Description

  • add script to generate versions.md in dynamic plugins doc
  • adds github workflow that runs every time backstage.json, packages/app/package.json or packages/backend/package.json is updated. Workflow opens PR with updated versions.md file

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

@kadel kadel requested a review from Copilot April 25, 2025 12:03
Copy link
Contributor

@Copilot 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 adds a script to generate a versions.md file for the dynamic plugins documentation along with a GitHub workflow that automates the update process when key files are changed.

  • Introduces a new Node.js script (update-versions-doc.mjs) to generate documentation.
  • Adds a GitHub Actions workflow (update-versions.yaml) to trigger the version update PR.

Reviewed Changes

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

File Description
scripts/update-versions-doc.mjs New script that collects branch and package version info to generate versions.md
.github/workflows/update-versions.yaml Workflow configuration to run the script and create a PR when key files are updated
Comments suppressed due to low confidence (1)

scripts/update-versions-doc.mjs:202

  • The use of 'console.fail' is not a standard method in Node.js. Consider using 'console.error' followed by terminating the process (e.g., process.exit(1)) to handle the error.
console.fail(`Unable to find create-app version in ${createAppVersion}`)

Copy link
Contributor

Copy link
Contributor

github-actions bot commented May 3, 2025

This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days.

@github-actions github-actions bot added the Stale label May 3, 2025
Copy link
Contributor

@github-actions github-actions bot removed the Stale label May 13, 2025
Copy link
Member

@gashcrumb gashcrumb left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@nickboldt
Copy link
Member

nickboldt commented May 16, 2025

Two thoughts (but otherwise +1):

  • could this PR include the updated ./docs/dynamic-plugins/versions.md as well?
  • rather than excluding the old 0.x and 1.0 branches, why don't we just delete them entirely? they're long since EOL.

Also copilot complained:

The use of 'console.fail' is not a standard method in Node.js. Consider using 'console.error' followed by terminating the process (e.g., process.exit(1)) to handle the error.
console.fail(`Unable to find create-app version in ${createAppVersion}`)

@kadel
Copy link
Member Author

kadel commented May 19, 2025

@nickboldt

Two thoughts (but otherwise +1):

  • could this PR include the updated ./docs/dynamic-plugins/versions.md as well?

good point, will do that. Not sure why I did not do that at from start.

  • rather than excluding the old 0.x and 1.0 branches, why don't we just delete them entirely? they're long since EOL.

I think that it still makes sense to keep the old branches, there is really no harm in it, they might be useful for some historical references

Also copilot complained:

The use of 'console.fail' is not a standard method in Node.js. Consider using 'console.error' followed by terminating the process (e.g., process.exit(1)) to handle the error.
console.fail(`Unable to find create-app version in ${createAppVersion}`)

this has bee already fixed a while back

@kadel kadel force-pushed the update-versions-doc branch from e78be22 to 637163b Compare May 19, 2025 13:18
Copy link
Contributor

kadel and others added 6 commits May 26, 2025 11:28
also adds github workflow to run this every time the the packages.json
is updated. Workflow opens PR with the versions.md updated content

Signed-off-by: Tomas Kral <[email protected]>
@kadel kadel force-pushed the update-versions-doc branch from 637163b to fe6f513 Compare May 26, 2025 09:40
@kadel kadel force-pushed the update-versions-doc branch from fe6f513 to f079097 Compare May 26, 2025 09:40
Copy link
Contributor

Copy link
Member

@nickboldt nickboldt left a comment

Choose a reason for hiding this comment

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

LGTM - nice to see the old 1.0-1.2 stuff has been purged.

Copy link

openshift-ci bot commented May 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gashcrumb, nickboldt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [gashcrumb,nickboldt]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nickboldt nickboldt added the lgtm label May 26, 2025
@nickboldt nickboldt merged commit 9c6eaf7 into redhat-developer:main May 26, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants