Skip to content

Commit

Permalink
#1276 Fixing the identification of builds based on commit ID
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed May 25, 2024
1 parent 481d45b commit 3bed25e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ class GitHubSCMExtension(
entityType = ProjectEntityType.BUILD,
propertyType = GitCommitPropertyType::class,
searchArguments = GitCommitPropertyType.getGitCommitSearchArguments(id)
).firstOrNull()?.let { buildId ->
).map { buildId ->
structureService.getBuild(buildId)
}.firstOrNull { build ->
build.project.id == project.id
}

private val client: OntrackGitHubClient by lazy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,10 @@ class MockSCMExtension(
entityType = ProjectEntityType.BUILD,
propertyType = MockSCMBuildCommitPropertyType::class,
searchArguments = MockSCMBuildCommitProperty.getSearchArguments(id)
).firstOrNull()?.let { buildId ->
).map { buildId ->
structureService.getBuild(buildId)
}.firstOrNull { build ->
build.project.id == project.id
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ class BitbucketServerSCMExtension(
entityType = ProjectEntityType.BUILD,
propertyType = GitCommitPropertyType::class,
searchArguments = GitCommitPropertyType.getGitCommitSearchArguments(id)
).firstOrNull()?.let { buildId ->
).map { buildId ->
structureService.getBuild(buildId)
}.firstOrNull { build ->
build.project.id == project.id
}

private fun waitAndMerge(prId: Int, from: String, message: String): Boolean {
Expand Down

0 comments on commit 3bed25e

Please sign in to comment.