Skip to content
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

fix(run): handle version strings aren't strictly semver #9

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

garryyao
Copy link

@garryyao garryyao commented Jan 5, 2024

This PR handles version strings in PR title that does not strictly conforms to semver and by coerce them into semver before comparing the two versions eliminates e.g. the following error we have seen from some repos:

Working on Synk PR...#2202:[Snyk] Security upgrade node from 18.17.0-alpine to 18.19-alpine
Error: TypeError: Invalid Version: 18.19-alpine

let from = matches[2];
let to = matches[3];
let from = coerce(matches[2]);
let to = coerce(matches[3]);
Copy link
Author

Choose a reason for hiding this comment

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

@garryyao garryyao merged commit 5e4e334 into master Jan 5, 2024
1 check passed
@garryyao garryyao deleted the fix/semver-pre-release branch January 5, 2024 17:32
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.

1 participant