Skip to content

Conversation

@DevanshMathur19
Copy link
Collaborator

Enhanced PLUGIN_STRIP_PREFIX with Glob-Aware Wildcard Support

This PR enhances the PLUGIN_STRIP_PREFIX functionality by adding wildcard pattern support, allowing dynamic path stripping without relying on shell scripting.


Key Features

  • Wildcard Patterns: Supports *, **, and ? for flexible path matching

  • Backward Compatible: Existing literal path prefixes continue to work as-is

  • Robust Validation: Comprehensive checks ensure invalid patterns are rejected gracefully

  • Added Unit Tests to test the working for all types of glob paths.


🔧 Wildcard Syntax

Wildcard Description Regex Equivalent
* Matches exactly one path segment [^/]+
** Matches zero or more segments .*
? Matches exactly one character [^/]

Backward compatibility maintained for using relative paths such as foo/

Testing

Testing Link: url
For the above testing correct directories were created:
Screenshot 2025-09-15 at 6 09 57 PM
Screenshot 2025-09-15 at 6 10 13 PM
Screenshot 2025-09-15 at 6 10 20 PM
Screenshot 2025-09-15 at 6 10 28 PM

@DevanshMathur19 DevanshMathur19 merged commit b6a0aee into drone-plugins:master Sep 16, 2025
6 checks passed
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.

2 participants