-
Notifications
You must be signed in to change notification settings - Fork 206
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
github_repo
fails when revision
is a non-semver version number
#2829
Labels
Comments
chrisnovakovic
added a commit
to chrisnovakovic/please
that referenced
this issue
Jun 19, 2023
`github_repo` currently strips the `v` prefix from the file names in the zip file downloaded from GitHub if `revision` is a semver, since GitHub silently does the same if asked to archive the code for semver-like tags. It looks like this logic extends to more than just semvers, though - the same behaviour has been observed for strings that are simple dotted version numbers with any number of components (e.g. `1.1.10.1`). Account for this in the prefix-stripping logic. Fixes thought-machine#2829.
chrisnovakovic
added a commit
to chrisnovakovic/please
that referenced
this issue
Jun 19, 2023
`github_repo` currently strips the `v` prefix from the file names in the zip file downloaded from GitHub if `revision` is a semver, since GitHub silently does the same if asked to archive the code for semver-like tags. It looks like this logic extends to more than just semvers, though - the same behaviour has been observed for strings that are simple dotted version numbers with any number of components (e.g. `v1.1.10.1`). Account for this in the prefix-stripping logic. Fixes thought-machine#2829.
This issue has been automatically marked as stale because it has not had any recent activity in the past 90 days. It will be closed if no further activity occurs. If you require additional support, please reply to this message. Thank you for your contributions. |
Not stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MWE:
This happens because the first command
github_repo
runs - namely, the GitHub archive zip extraction operation using arcat - fails because arcat is given the wrong prefix to strip by the rule, but exits successfully:GitHub doesn't publish the algorithm they use to decide when to strip the
v
prefix from a tag name during the archival process, so the rule currently assumes that anyrevision
that looks like a semver will have any leadingv
stripped from the top-level directory name in the exported archive. In reality the logic appears to be more complicated than that. It's probably safe to assume that any dotted version number format will also cause thev
prefix to be stripped on GitHub's side.In addition, perhaps it's worth changing arcat so that it warns/errors if any value given by
-s
results in no files being extracted - the underlying cause would then become clearer here.The text was updated successfully, but these errors were encountered: