From 7a76f2342e72fa310c799b79bf0c0616d973982b Mon Sep 17 00:00:00 2001 From: Colin Hutchinson Date: Mon, 15 Apr 2024 14:47:07 +0000 Subject: [PATCH] chore: this warning isn't actionable (I think) so let's remove it until it is --- pkg/plugins/trigger/pull-request.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/plugins/trigger/pull-request.go b/pkg/plugins/trigger/pull-request.go index 1c958dd15..018028d29 100644 --- a/pkg/plugins/trigger/pull-request.go +++ b/pkg/plugins/trigger/pull-request.go @@ -28,7 +28,6 @@ import ( "github.com/jenkins-x/lighthouse/pkg/labels" "github.com/jenkins-x/lighthouse/pkg/plugins" "github.com/jenkins-x/lighthouse/pkg/scmprovider" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -57,9 +56,6 @@ func handlePR(c Client, trigger *plugins.Trigger, pr scm.PullRequestHook) error return nil } - if err = infoMsg(c, pr.PullRequest); err != nil { - return err - } return buildAllIfTrustedOrDraft(c, trigger, pr) case scm.ActionEdited, scm.ActionUpdate: // if someone changes the base of their PR, we will get this @@ -147,23 +143,6 @@ func buildAllIfTrustedOrDraft(c Client, trigger *plugins.Trigger, pr scm.PullReq return nil } -func infoMsg(c Client, pr scm.PullRequest) error { - if isSyntaxDeprecated := isPipelinesSyntaxDeprecated(c.Config, pr.Repository()); !isSyntaxDeprecated { - return nil - } - - org, repo, _ := orgRepoAuthor(pr) - - comment := `[jx-info] Hi, we've detected that the pipelines in this repository are using a syntax that will soon be deprecated. -We'll continue to update you through PRs as we progress. Please check [#8589](https://www.github.com/jenkins-x/jx/issues/8589) for further information. -` - - if err := c.SCMProviderClient.CreateComment(org, repo, pr.Number, true, comment); err != nil { - return errors.Wrap(err, "failed to comment info message") - } - return nil -} - func isPipelinesSyntaxDeprecated(cfg *config.Config, repo scm.Repository) bool { logger := logrus.WithField("repo", repo.FullName) for _, pre := range cfg.GetPresubmits(repo) {