alexellis / derek

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

Add comma separated multi labels facility #111

Closed rgee0 closed 5 years ago

rgee0 commented 5 years ago

Signed-off-by: Richard Gee richard@technologee.co.uk

Description

This change enables multiple labels to be applied through a single comment, by allowing for a comma separated list to be provided. Also added plural aliases for the labels commands.

As the deletion of multiple labels is currently an iterative process, due to how the GitHub API is presented, an error could occur mid-flow when deleting and cause subsequent labels to not be applied. Mitigation against this is that labels are visually verifiable.

Motivation and Context

Currently to add multiple labels a maintainer must add one comment for each label. Members have found this confusing with some calling the command multiple times per comment.

[x] I have raised an issue to propose this change (fixes #32, closes #110 )

How Has This Been Tested?

Unit tests added. Built Derek at rgee0/derek:multiLabels Deployed locally Tested on test repo - https://github.com/rgee0/Test/issues/7

image

image

Types of changes

Checklist:

alexellis commented 5 years ago

What's the limit in one command?

alexellis commented 5 years ago
screenshot 2019-02-17 at 16 39 43

I guess this is what I'd be concerned about - intentional or otherwise:

alexellis commented 5 years ago

What if we set a limit to something like 5 labels at once and have that configurable?

alexellis commented 5 years ago

Other than my comment here I think this is ready to merge. What do you think Richard?

rgee0 commented 5 years ago

What if we set a limit to something like 5 labels at once and have that configurable?

And the action upon finding more?

alexellis commented 5 years ago

Set a reasonable value, then ignore anything over.