-
Notifications
You must be signed in to change notification settings - Fork 0
fix(openapi): update script for darwin and regen #525
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 7.14.0 | ||
| 7.18.0-SNAPSHOT |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,57 @@ | ||||||||||||||||||||||||||||
| #!/bin/sh | ||||||||||||||||||||||||||||
| # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ | ||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||
| # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| git_user_id=$1 | ||||||||||||||||||||||||||||
| git_repo_id=$2 | ||||||||||||||||||||||||||||
| release_note=$3 | ||||||||||||||||||||||||||||
| git_host=$4 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ "$git_host" = "" ]; then | ||||||||||||||||||||||||||||
| git_host="github.com" | ||||||||||||||||||||||||||||
| echo "[INFO] No command line input provided. Set \$git_host to $git_host" | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ "$git_user_id" = "" ]; then | ||||||||||||||||||||||||||||
| git_user_id="blinklabs-io" | ||||||||||||||||||||||||||||
| echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ "$git_repo_id" = "" ]; then | ||||||||||||||||||||||||||||
| git_repo_id="cardano-node-api" | ||||||||||||||||||||||||||||
| echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ "$release_note" = "" ]; then | ||||||||||||||||||||||||||||
| release_note="Minor update" | ||||||||||||||||||||||||||||
| echo "[INFO] No command line input provided. Set \$release_note to $release_note" | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Initialize the local directory as a Git repository | ||||||||||||||||||||||||||||
| git init | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Adds the files in the local repository and stages them for commit. | ||||||||||||||||||||||||||||
| git add . | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Commits the tracked changes and prepares them to be pushed to a remote repository. | ||||||||||||||||||||||||||||
| git commit -m "$release_note" | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Sets the new remote | ||||||||||||||||||||||||||||
| git_remote=$(git remote) | ||||||||||||||||||||||||||||
| if [ "$git_remote" = "" ]; then # git remote not defined | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| if [ "$GIT_TOKEN" = "" ]; then | ||||||||||||||||||||||||||||
| echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." | ||||||||||||||||||||||||||||
| git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git | ||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||
| git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git | ||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
Comment on lines
+44
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security: Token may leak in git config and process listings. Embedding the token directly in the remote URL stores it in 🔒 Safer alternative using credential helper if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
- git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ git config credential.helper '!f() { echo "username=${git_user_id}"; echo "password=${GIT_TOKEN}"; }; f'
fiAlternatively, if this is a standard OpenAPI generator template that you don't intend to modify, this may be acceptable for CI/CD contexts where the 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is generated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
✏️ Learnings added
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| git pull origin master | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Pushes (Forces) the changes in the local repository up to the remote repository | ||||||||||||||||||||||||||||
| echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" | ||||||||||||||||||||||||||||
| git push origin master 2>&1 | grep -v 'To https' | ||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The comment on line 55 says "Pushes ... the changes" but 🐛 Proposed fix-git push origin master 2>&1 | grep -v 'To https'
+git push origin master 2>&1 | grep 'To https'Or remove the grep entirely if you want to see all output: -git push origin master 2>&1 | grep -v 'To https'
+git push origin master 2>&1📝 Committable suggestion
Suggested change
Suggested change
🤖 Prompt for AI Agents
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is generated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
✏️ Learnings added
|
||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
🧩 Analysis chain
🌐 Web query:
latest stable version openapi-generator 2025💡 Result:
The latest stable release of OpenAPI Generator in 2025 is v7.18.0, released on December 22, 2025. [1], [2]
🏁 Script executed:
Repository: blinklabs-io/cardano-node-api
Length of output: 109
🏁 Script executed:
Repository: blinklabs-io/cardano-node-api
Length of output: 931
🏁 Script executed:
Repository: blinklabs-io/cardano-node-api
Length of output: 88
Upgrade generator version to stable release.
The openapi-generator version should be updated from
7.18.0-SNAPSHOTto7.18.0(stable). The stable release has been available since December 22, 2025, and using the production-ready version is recommended over the pre-release build.🤖 Prompt for AI Agents
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.
no
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.
@wolf31o2, understood. I'll leave the generator version as is.🧠 Learnings used