Fix incorrect description of glob matching #680
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.
Description of the change
The previous description of how globs are matched is incorrect.
Since the underlying "evaluation engine" is simply an OPA policy (which is described here), the Golang
doublestar
library has nothing to do with the evaluation. OPA uses its own built-in glob evaluation, which does not follow the same rules asdoublestar
. See this Rego Playground for examples of where they don't match your docs (the ones reported as "broken").Additionally, if any custom push policies are attached, the default policy gets thrown out; it's purely up to those policies to interpret the project globs however they see fit (if at all).
This PR modifies the glob section to point to the correct documentation for pattern matching, and updates the examples for quality and accuracy.
Checklist
Please make sure that the proposed change checks all the boxes below before requesting a review:
main
branch.If the proposed change is ready to be merged, please request a review from
@spacelift-io/solutions-engineering
. Someone will review and merge the pull request.Spacelift employees should request reviews from the relevant engineers and are allowed to merge pull requests after they got at least one approval.
Thank you for your contribution! 🙇