Closed rgee0 closed 5 years ago
@rgee0 thanks for your work! I am interested if you tried running Test_getCommandValue
before your commit. I mean, it makes sense to check that the test fails before and passes after a fix.
@kolyshkin the tests I believe are run through CI and Richard is known for his attention to detail and unit testing. Do we have some issues with the CI not running all tests for all packages?
I made a change for this recently, not sure if it's related?
Alex
@rgee0 FYI I've been making major structural changes to the Derek README. Please can you revert your changes to README.md and apply them to the user guide? I'll go ahead and merge after that then bump the version.
Alex
rebased
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.
This change also introduces a new env var which limits how many labels can be processed in a single command. This defaults to 5 but can be set to preference through
multilabel_limit
. An example has been included in thestack.example.yml
. A test has been added for the function which retrieves this value from the env vars.As the requested labels are pre-processed to ascertain which are actionable and which are not given the requested action, the limit will be applied to the first n actionable labels, rather than the first n requested labels.
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/8updated tests to cover handling of newlines
Types of changes
Checklist:
git commit -s