Skip to content

Commit 80f794b

Browse files
authored
Merge pull request #3349 from GreyPlane/pr/fix-azure-repos-target-ref-name
fix azure repos targetRefName
2 parents 2cd3690 + 9b47e52 commit 80f794b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/core/src/main/scala/org/scalasteward/core/forge/azurerepos/JsonCodec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private[azurerepos] object PullRequestPayload {
3838
def from(data: NewPullRequestData): PullRequestPayload =
3939
PullRequestPayload(
4040
sourceRefName = withPrefix(data.head),
41-
targetRefName = data.base.name,
41+
targetRefName = withPrefix(data.base.name),
4242
title = data.title,
4343
labels = Option.when(data.labels.nonEmpty)(data.labels),
4444
description = data.body

modules/core/src/test/scala/org/scalasteward/core/forge/azurerepos/AzureReposApiAlgTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class AzureReposApiAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
209209
title = "Update cats-effect to 3.3.14",
210210
body = "Updates org.typelevel:cats-effect from 3.3.13 to 3.3.14.",
211211
head = "refs/heads/update/cats-effect-3.3.14",
212-
base = Branch("refs/heads/main"),
212+
base = Branch("main"),
213213
labels = List.empty,
214214
assignees = List.empty,
215215
reviewers = List.empty

modules/core/src/test/scala/org/scalasteward/core/forge/azurerepos/JsonCodecTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class JsonCodecTest extends FunSuite {
2424
val expected =
2525
json"""{
2626
"sourceRefName" : "refs/heads/source",
27-
"targetRefName" : "main",
27+
"targetRefName" : "refs/heads/main",
2828
"title" : "Test MR title",
2929
"labels" : null,
3030
"description" : "Test MR body"
@@ -38,7 +38,7 @@ class JsonCodecTest extends FunSuite {
3838
val expected =
3939
json"""{
4040
"sourceRefName" : "refs/heads/source",
41-
"targetRefName" : "main",
41+
"targetRefName" : "refs/heads/main",
4242
"title" : "Test MR title",
4343
"labels" : [ "foo", "bar" ],
4444
"description" : "Test MR body"

0 commit comments

Comments
 (0)