bitsbeats / drone-tree-config

Drone helper for mono repositories.
Apache License 2.0
103 stars 24 forks source link

Add the (optional) ability to regex match against the repo slug #9

Closed mach6 closed 4 years ago

mach6 commented 4 years ago

First off -- Thanks for creating drone-tree-config.

This change set adds the ability to use drone-tree-config in an opt-in basis by regex matching against the repo slug. Regex patterns are maintained in a file which must be accessible to the drone-tree-config container. Regex pattern matching mode could be desirable in the case where a .drone.yml files exist in a repo and it should not ever be considered (such as https://github.com/drone/boilr-config -- which has a template .drone.yml) and/or when most repos that the drone server is activated for, are not mono-repos.

In addition this change set switches plugin.New(..) to use functional options -- allowing for further options to be added to the plugin without changing the parameters of the func plugin.New() each time.

foosinn commented 4 years ago

Great idea, thanks!