Skip to content

Commit

Permalink
Add SECURITY as a supported label
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier committed Oct 7, 2019
1 parent 8422713 commit 193cc50
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/changelog/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import (
type Kind int

const (
kindChange = iota
kindSecurity = iota
kindChange
kindFeature
kindEnhancement
kindBugfix
Expand All @@ -40,6 +41,8 @@ const (
func FromString(s string) (Kind, error) {
s = strings.ToUpper(s)
switch {
case strings.Contains(s, "SECURITY"):
return kindSecurity, nil
case strings.Contains(s, "CHANGE"):
return kindChange, nil
case strings.Contains(s, "FEATURE"):
Expand All @@ -54,6 +57,8 @@ func FromString(s string) (Kind, error) {

func (k Kind) String() string {
switch k {
case kindSecurity:
return "SECURITY"
case kindChange:
return "CHANGE"
case kindFeature:
Expand All @@ -74,6 +79,8 @@ func ParseKinds(s []string) Kinds {
m := make(map[Kind]struct{})
for _, k := range s {
switch k {
case "SECURITY":
m[kindSecurity] = struct{}{}
case "CHANGE":
m[kindChange] = struct{}{}
case "FEATURE":
Expand Down

0 comments on commit 193cc50

Please sign in to comment.