Repository: scala-steward-org/scala-steward (scala)

Issue:
Fetch tags in GitAlg.syncFork
I think we also need to fetch tags in `GitAlg.syncFork` because some repos require tags to be present in order for the build to load successfully. See for example https://github.com/almond-sh/almond/pull/483.

Pull request description:
Addresses #1284

Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/git/GitAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/git/GitAlg.scala
index 6d7f1c7323..56048be6a5 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/git/GitAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/git/GitAlg.scala
@@ -188,7 +188,7 @@ object GitAlg {
           branch = defaultBranch.name
           remoteBranch = s"$remote/$branch"
           _ <- exec(Nel.of("remote", "add", remote, upstreamUrl.toString), repoDir)
-          _ <- exec(Nel.of("fetch", remote, branch), repoDir)
+          _ <- exec(Nel.of("fetch", "--tags", remote, branch), repoDir)
           _ <- exec(Nel.of("checkout", "-B", branch, "--track", remoteBranch), repoDir)
           _ <- exec(Nel.of("merge", remoteBranch), repoDir)
           _ <- push(repo, defaultBranch)


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/git/GitAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/git/GitAlgTest.scala
index 1fd96f14c3..ef8f5cd9b0 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/git/GitAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/git/GitAlgTest.scala
@@ -89,7 +89,7 @@ class GitAlgTest extends AnyFunSuite with Matchers {
           "upstream",
           "http://github.com/fthomas/datapackage"
         ),
-        List(askPass, repoDir, "git", "fetch", "upstream", "master"),
+        List(askPass, repoDir, "git", "fetch", "--tags", "upstream", "master"),
         List(askPass, repoDir, "git", "checkout", "-B", "master", "--track", "upstream/master"),
         List(askPass, repoDir, "git", "merge", "upstream/master"),
         List(askPass, repoDir, "git", "push", "--force", "--set-upstream", "origin", "master")
diff --git a/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala
index 605e1e8950..da704c32bf 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala
@@ -70,7 +70,7 @@ class VCSRepoAlgTest extends AnyFunSuite with Matchers {
           "upstream",
           s"https://${config.vcsLogin}@github.com/fthomas/datapackage"
         ),
-        List(askPass, repoDir, "git", "fetch", "upstream", "master"),
+        List(askPass, repoDir, "git", "fetch", "--tags", "upstream", "master"),
         List(askPass, repoDir, "git", "checkout", "-B", "master", "--track", "upstream/master"),
         List(askPass, repoDir, "git", "merge", "upstream/master"),
         List(askPass, repoDir, "git", "push", "--force", "--set-upstream", "origin", "master")