-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat(create-pr): Improve the version executed (SHA instead branch) #81
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
base: main
Are you sure you want to change the base?
Conversation
7d267f5
to
b3aff48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The PR refactors how the GitHub Tools version is passed (using SHA via github.action_ref
), strengthens commit-generation scripts by ensuring branches exist and are up to date, and streamlines the platform release script’s branch naming and changelog commit logic.
- Make
github-tools-version
input optional, defaulting to the caller SHA - Fetch and verify local/remote branches in
generate-rc-commits.mjs
- Simplify
get_release_branch_name
and conditionally addcommits.csv
in the shell script
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/workflows/create-release-pr.yml | Added optional github-tools-version input defaulting to github.action_ref and debug logs |
.github/scripts/generate-rc-commits.mjs | Inserted git.fetch plus local/remote branch existence checks before commit filtering |
.github/scripts/create-platform-release-pr.sh | Collapsed release-branch logic, commented old variants, and conditionally stage commits.csv |
Comments suppressed due to low confidence (2)
.github/workflows/create-release-pr.yml:52
- Wrap the expression in quotes (e.g.,
default: '${{ github.action_ref }}'
) to ensure the YAML parser treats it as a string rather than attempting to interpolate prematurely.
default: ${{ github.action_ref }}
.github/scripts/create-platform-release-pr.sh:231
- This line lacks a leading '+' in the diff and isn’t indented under the
if
block—ensure it’s only executed when./commits.csv
exists to avoid unintended adds.
git add ./commits.csv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alucardzom LGTM but copilot has in interesting (cosmetic) suggestion.
Interesting. At first I thought the linked issue had a simple workaround (setting But supposedly setting |
Adding a comment about why the github.action_ref should be added as input. Co-authored-by: Mark Stacey <markjstacey@gmail.com>
We will treat this in a separate PR with a different objective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -254,4 +254,4 @@ else | |||
echo "Changelog PR Created" | |||
fi | |||
|
|||
echo "Changelog PR Ready" | |||
echo "Changelog PR Ready" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Presumably this was a mistake? Not super important though
To unify the release method, I’ve tested and dumped the GH action variables at GitHub variable and it’s impossible on a reusable workflow to reuse the SHA used to call it, I’ve tried even testing it, but I can’t.
There is no mention of the Github-tools SHA, the github.action_ref works for a branch name (example) but not for an SHA (example) using it as mentioned in an issue (usage).
There is a few opened cases about this issue at GH pending to be solved:
github.action_repository
andgithub.action_ref
are empty inrun
for composite actions actions/runner#2473So in the meantime this is fixed, I would prefer to pass the GitHub-tools-version SHA input until it’s fixed and then this variable could be removed, I prefer to pass a PR changing the SHA instead of letting someone break something at the main branch on Github tools by mistake and promote the change to main, which is currently how it works.