Repository navigation
Allow slashes in extra-packages refs - #306
Merged
Merged
Conversation
The greedy user and package groups matched up to the last slash, so `sublimelsp/LSP@feat/foo` was parsed as the repository foo of the user `sublimelsp/LSP@feat`. Stop them at the first slash and colon, so that the ref is everything after the first @.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The groups for the user and the package name in the
extra-packagesregexes were greedy, so they matched up to the last/in the line. When the ref contains a slash, the line is split in the wrong place:sublimelsp/LSP@feat/foosublimelsp/LSP@feat, repofoo, no refsublimelsp, repoLSP, reffeat/fooLSP:sublimelsp/LSP@feat/fooLSP, usersublimelsp/LSP@feat, repofoo, no refLSP, usersublimelsp, repoLSP, reffeat/fooThe package name now stops at the first
:or/, and the user at the first/, so the ref is everything after the first@. Lines without a slash in the ref parse as before, includingA File Icon:SublimeText/AFileIcon@st3-,SublimeText/UnitTestingand plain package names for Package Control.I ran the loop from
action.yamlunder bash withInstallPackagestubbed for these cases, and checked thatgitResolvePrefixToTagresolves a real branch with a slash (chore/guard-against-plugin-exceptionson sublimelsp/LSP), since itsseduses%as the delimiter.