Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: this warning isn't actionable so let's remove it #1602

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions pkg/plugins/trigger/pull-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,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
Expand Down Expand Up @@ -147,23 +144,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) {
Expand Down
Loading