Skip to content

Commit

Permalink
rename no-impact to misc
Browse files Browse the repository at this point in the history
The old `release/no-impact` label is too narrowly scoped for how we use
it. We want to include prs that make changes to the internal project
workflow, which do not really belong within a "No Impact" section.
Therefore, I renamed the section to be "Miscellaneous" so that it will
be more generic.

Signed-off-by: Clara Fu <[email protected]>
  • Loading branch information
clarafu committed Oct 6, 2020
1 parent 5a99ab3 commit eedcde3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
// The ordering of this list is the order of precedence of the labels
var ValidLabels = []string{
"breaking",
"release/no-impact",
"enhancement",
"bug",
"enhancement",
"misc",
}

type PullRequestsNotLabelled struct {
Expand Down Expand Up @@ -87,7 +87,7 @@ func (g Generator) Generate(prs []github.PullRequest) error {
Section{Title: "Breaking", Icon: "🚨", PRs: sectionPRs["breaking"]},
Section{Title: "Features", Icon: "✈️", PRs: sectionPRs["enhancement"]},
Section{Title: "Bug Fixes", Icon: "🐞", PRs: sectionPRs["bug"]},
Section{Title: "No Impact", Icon: "🤷", PRs: sectionPRs["release/no-impact"]},
Section{Title: "Miscellaneous", Icon: "🤷", PRs: sectionPRs["misc"]},
}

err := g.template.Render(sections)
Expand Down
20 changes: 10 additions & 10 deletions generate/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type GenerateTest struct {
ExpectedBreaking []generate.PullRequest
ExpectedFeatures []generate.PullRequest
ExpectedBugFixes []generate.PullRequest
ExpectedNoImpact []generate.PullRequest
ExpectedMisc []generate.PullRequest

GenerateErr error
}
Expand All @@ -55,14 +55,14 @@ func (s *GenerateSuite) TestGenerate() {
},
{
Title: "don't worry about it!",
Labels: []string{"release/no-impact"},
Labels: []string{"misc"},
},
},

ExpectedBreaking: []generate.PullRequest{{Title: "new breaking change!"}},
ExpectedFeatures: []generate.PullRequest{{Title: "cool new feature!"}},
ExpectedBugFixes: []generate.PullRequest{{Title: "squash that bug!"}},
ExpectedNoImpact: []generate.PullRequest{{Title: "don't worry about it!"}},
ExpectedMisc: []generate.PullRequest{{Title: "don't worry about it!"}},
},
{
It: "sorts PRs by number",
Expand Down Expand Up @@ -110,31 +110,31 @@ func (s *GenerateSuite) TestGenerate() {
PRs: []github.PullRequest{
{
Title: "new breaking change!",
Labels: []string{"enhancement", "breaking", "release/no-impact", "bug"},
Labels: []string{"enhancement", "breaking", "misc", "bug"},
},
},

ExpectedBreaking: []generate.PullRequest{{Title: "new breaking change!"}},
},
{
It: "groups PRs as no impact before features and bugs",
It: "groups PRs as bugs before features and misc",

PRs: []github.PullRequest{
{
Title: "super fun pull request",
Labels: []string{"enhancement", "release/no-impact", "bug"},
Labels: []string{"enhancement", "misc", "bug"},
},
},

ExpectedNoImpact: []generate.PullRequest{{Title: "super fun pull request"}},
ExpectedBugFixes: []generate.PullRequest{{Title: "super fun pull request"}},
},
{
It: "groups PRs as features before bugs",
It: "groups PRs as features before misc",

PRs: []github.PullRequest{
{
Title: "best feature ever",
Labels: []string{"enhancement", "bug"},
Labels: []string{"enhancement", "misc"},
},
},

Expand Down Expand Up @@ -253,7 +253,7 @@ omai wa mo shindeiru`,
generate.Section{Title: "Breaking", Icon: "🚨", PRs: t.ExpectedBreaking},
generate.Section{Title: "Features", Icon: "✈️", PRs: t.ExpectedFeatures},
generate.Section{Title: "Bug Fixes", Icon: "🐞", PRs: t.ExpectedBugFixes},
generate.Section{Title: "No Impact", Icon: "🤷", PRs: t.ExpectedNoImpact},
generate.Section{Title: "Miscellaneous", Icon: "🤷", PRs: t.ExpectedMisc},
})
}
})
Expand Down

0 comments on commit eedcde3

Please sign in to comment.