alexellis / derek

Reduce maintainer fatigue by automating GitHub
https://github.com/alexellis/derek/blob/master/USER_GUIDE.md
MIT License
806 stars 72 forks source link

Add ability to override/merge items in local .DEREK.yml #140

Closed Waterdrips closed 4 years ago

Waterdrips commented 4 years ago

Description

We can now provide some local overrides from our Local DEREK.yml, these overrides are then merged with the remote DEREK.yaml. This allows us to add specific users to specific repos, or add features for specific ones too. Any slices are merged and the single values are overridden by the local values.

Signed-off-by: Alistair Hey alistair@heyal.co.uk

Motivation and Context

How Has This Been Tested?

Unit tests written, and this was tested on github using this repo: https://github.com/Waterdrips/heyal-ofc-customers

I setup a .DEREK.yml that had me as a contributor and a load of general config, but no "features" pointed the Redirect at .DEREK-OVERRIDE.yml in the same repo, which added @alexellis as a contributor, plus it had the features listed.

Then I created a non signed commit and PR, DCO check was done (features in redirect file) I was able to use the derek commands (local file)

And Alex was able to use Derek commands (set in redirect file)

Types of changes

Checklist:

Waterdrips commented 4 years ago

Looks good so far. I think we need to add an abuse-prevention technique for cyclic redirects or redirects which are too deep.

Currently it only follows the local file's redirect url (only goes 1 layer deep) We could add the ability to follow redirects, adding a max depth?

alexellis commented 4 years ago

I suspect the messages list might break @Waterdrips, can you add some tests for union/intersection?

Waterdrips commented 4 years ago

Good spot. Iv just written a failing test.

I'll get a pr in to sort that messages list soon