Skip to content
This repository has been archived by the owner on Jul 3, 2022. It is now read-only.

Commit

Permalink
fix: Revert "feat: add label in case of conflict (ti-community-infra#652
Browse files Browse the repository at this point in the history
)"

This reverts commit a168b92

Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed Jul 21, 2021
1 parent 284881c commit 95c19e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions internal/pkg/externalplugins/cherrypicker/cherrypicker.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,9 @@ func (s *Server) handle(logger *logrus.Entry, requestor string,

// Title for GitHub issue/PR.
title = fmt.Sprintf("%s (#%d)", title, num)
hasConflicts := false

// Try git am --3way localPath.
if err := r.Am(localPath); err != nil {
hasConflicts = true
var errs []error
logger.WithError(err).Warnf("Failed to apply #%d on top of target branch %q.", num, targetBranch)
if opts.IssueOnConflict {
Expand Down Expand Up @@ -680,11 +678,6 @@ func (s *Server) handle(logger *logrus.Entry, requestor string,
labels.Insert(pickedLabel)
}

// Add conflicts label.
if hasConflicts {
labels.Insert(tiexternalplugins.CherryPickHasConflicts)
}

if err := s.GitHubClient.AddLabels(org, repo, createdNum, labels.List()...); err != nil {
logger.WithError(err).Warnf("Failed to add labels %v", labels.List())
}
Expand Down
2 changes: 0 additions & 2 deletions internal/pkg/externalplugins/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import "fmt"
const (
// CanMergeLabel is the name of the merge label applied by the merge plugin.
CanMergeLabel = "status/can-merge"
// CherryPickHasConflicts is the name of the conflicts label applied by the cherry-pick plugin.
CherryPickHasConflicts = "status/cherry-pick-has-conflicts"
)

const (
Expand Down

0 comments on commit 95c19e1

Please sign in to comment.