Skip to content

Commit eaf4ea2

Browse files
authored
Merge pull request #3802 from scala-steward-org/temporarily-stop-commenting-on-superseded-prs-due-to-bug-3797
Temporarily stop commenting on superseded PRs due to bug #3797
2 parents 2ff62bd + 53a7a2d commit eaf4ea2

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

modules/core/src/main/scala/org/scalasteward/core/nurture/NurtureAlg.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import org.scalasteward.core.coursier.CoursierAlg
2424
import org.scalasteward.core.data.*
2525
import org.scalasteward.core.data.ProcessResult.{Created, Ignored, Updated}
2626
import org.scalasteward.core.edit.{EditAlg, EditAttempt}
27-
import org.scalasteward.core.forge.ForgeType.GitHub
2827
import org.scalasteward.core.forge.data.*
2928
import org.scalasteward.core.forge.data.NewPullRequestData.{filterLabels, labelsFor}
3029
import org.scalasteward.core.forge.{ForgeApiAlg, ForgeRepoAlg}
@@ -135,18 +134,10 @@ final class NurtureAlg[F[_]](config: ForgeCfg)(implicit
135134
oldPr: PullRequestData[Id]
136135
): F[Unit] =
137136
logger.attemptWarn.label_(
138-
s"Closing obsolete PR ${oldPr.url.renderString} for ${oldPr.update.show}"
137+
s"Closing obsolete PR ${oldPr.url.renderString} for ${oldPr.update.show} in PR #$newNumber - will not comment due to https://github.com/scala-steward-org/scala-steward/issues/3797"
139138
) {
140139
for {
141140
_ <- pullRequestRepository.changeState(data.repo, oldPr.url, PullRequestState.Closed)
142-
comment = config.tpe match {
143-
// If a PR is part of a list element, GitHub renders its title
144-
case GitHub => s"""|Superseded by
145-
|- ${forgeApiAlg.referencePullRequest(newNumber)}
146-
|""".stripMargin.trim
147-
case _ => s"Superseded by ${forgeApiAlg.referencePullRequest(newNumber)}."
148-
}
149-
_ <- forgeApiAlg.commentPullRequest(data.repo, oldPr.number, comment)
150141
oldRemoteBranch = oldPr.updateBranch.withPrefix("origin/")
151142
oldBranchExists <- gitAlg.branchExists(data.repo, oldRemoteBranch)
152143
authors <-

0 commit comments

Comments
 (0)