Skip to content

Commit

Permalink
Merge pull request kubernetes#4286 from xiangpengzhao/remove-rne
Browse files Browse the repository at this point in the history
Remove label "release-note-experimental"
  • Loading branch information
cjwagner authored Aug 31, 2017
2 parents 2ccf434 + b40aca8 commit cbf22fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
10 changes: 4 additions & 6 deletions mungegithub/mungers/release-note-label.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,24 @@ const (
releaseNote = "release-note"
releaseNoteNone = "release-note-none"
releaseNoteActionRequired = "release-note-action-required"
releaseNoteExperimental = "release-note-experimental"

releaseNoteFormat = `Adding ` + releaseNoteLabelNeeded + ` because the release note process has not been followed.
One of the following labels is required %q, %q, %q or %q.
One of the following labels is required %q, %q or %q.
Please see: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed.`
parentReleaseNoteFormat = `The 'parent' PR of a cherry-pick PR must have one of the %q or %q labels, or this PR must follow the standard/parent release note labeling requirement. (release-note-experimental must be explicit for cherry-picks)`
parentReleaseNoteFormat = `The 'parent' PR of a cherry-pick PR must have one of the %q or %q labels, or this PR must follow the standard/parent release note labeling requirement.`

noReleaseNoteComment = "none"
actionRequiredNote = "action required"
)

var (
releaseNoteBody = fmt.Sprintf(releaseNoteFormat, releaseNote, releaseNoteActionRequired, releaseNoteExperimental, releaseNoteNone)
releaseNoteBody = fmt.Sprintf(releaseNoteFormat, releaseNote, releaseNoteActionRequired, releaseNoteNone)
parentReleaseNoteBody = fmt.Sprintf(parentReleaseNoteFormat, releaseNote, releaseNoteActionRequired)
noteMatcherRE = regexp.MustCompile(`(?s)(?:Release note\*\*:\s*(?:<!--[^<>]*-->\s*)?` + "```(?:release-note)?|```release-note)(.+?)```")
)

// ReleaseNoteLabel will add the releaseNoteMissingLabel to a PR which has not
// set one of the appropriete 'release-note-*' labels but has LGTM
// set one of the appropriate 'release-note-*' labels but has LGTM
type ReleaseNoteLabel struct {
config *github.Config
}
Expand Down Expand Up @@ -195,7 +194,6 @@ func chooseLabel(composedReleaseNote string) string {
func releaseNoteAlreadyAdded(obj *github.MungeObject) bool {
return obj.HasLabel(releaseNote) ||
obj.HasLabel(releaseNoteActionRequired) ||
obj.HasLabel(releaseNoteExperimental) ||
obj.HasLabel(releaseNoteNone)
}

Expand Down
17 changes: 0 additions & 17 deletions mungegithub/mungers/release-note-label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ func TestReleaseNoteLabel(t *testing.T) {
mustHave: []string{lgtmLabel, releaseNoteActionRequired},
mustNotHave: []string{releaseNoteLabelNeeded},
},
{
name: "LGTM with release-note-experimental",
issue: github_test.Issue(testBotName, 1, []string{lgtmLabel, releaseNoteExperimental}, true),
mustHave: []string{lgtmLabel, releaseNoteExperimental},
mustNotHave: []string{releaseNoteLabelNeeded},
},
{
name: "LGTM with release-note-label-needed",
issue: github_test.Issue(testBotName, 1, []string{lgtmLabel, releaseNoteLabelNeeded}, true),
Expand Down Expand Up @@ -104,11 +98,6 @@ func TestReleaseNoteLabel(t *testing.T) {
issue: github_test.Issue(testBotName, 1, []string{releaseNoteActionRequired}, true),
mustHave: []string{releaseNoteActionRequired},
},
{
name: "release-note-experimental",
issue: github_test.Issue(testBotName, 1, []string{releaseNoteExperimental}, true),
mustHave: []string{releaseNoteExperimental},
},
{
name: "release-note and release-note-label-needed",
issue: github_test.Issue(testBotName, 1, []string{releaseNote, releaseNoteLabelNeeded}, true),
Expand All @@ -127,12 +116,6 @@ func TestReleaseNoteLabel(t *testing.T) {
mustHave: []string{releaseNoteActionRequired},
mustNotHave: []string{releaseNoteLabelNeeded},
},
{
name: "release-note-experimental and release-note-label-needed",
issue: github_test.Issue(testBotName, 1, []string{releaseNoteExperimental, releaseNoteLabelNeeded}, true),
mustHave: []string{releaseNoteExperimental},
mustNotHave: []string{releaseNoteLabelNeeded},
},
{
name: "do not add needs label when parent PR has releaseNote label",
branch: "release-1.2",
Expand Down

0 comments on commit cbf22fb

Please sign in to comment.