Based on the received feedback I updated the documentation of the function. Also replaced variable temp by an more declaritive variable.
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
Further I created some unit test which should cover all relevant scenarios for the created function.
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
Introduced an new label to set the scaling factor that is used to calculate th proportions, setting it to 0 also allows to disable scaling.
Updated the tests to reflect the changes and added a new test which shows that setting the scaling factor to 0 indeed does disable scaling.
Ensured that the scaling factor is always between [0 and 100].
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
Note, not all `alexellis/github` references should be changed, there are
a number of repos which are not part of the openfaas org, this commit
excludes those.
Signed-off-by: John McCabe <john@johnmccabe.net>