repo/path wildcard matching - closes #151 #150
Merged
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.
Summary
Adds support for use of repository and path wildcards in
config:repoPaths
to permit:owner/*
topath-segment/repo
owner/repo: ~/somePath/target
) when presentrunCustomCommand
Avoids having to individually add each repo-path combination for org/owner while retaining no-match/no-mapping behavior and prioritizing direct-mapped owner/repo to full path.
Assumes repo wildcard match is defined as
owner/*
and that path is well-formed partial path, ending with/*
First
go
attempt - chose simplestrings
manipulation overregexp
given the limited matching cases of owner/repo, owner/*, path/.../*. Also chose to introducegetRepoLocalPath
in modelUtils.go as a direct function vs. a type method, since it didn't appear elsewhere or make sense to be "generally useful from the Model"Happy to revise or adjust approach.
How did you test this change?
Incorrectly mapped paths, non-existent paths, repoPaths lookup misses retain error path when customCommand fails.
Images/Videos
closes #151