Skip to content

Commit

Permalink
Add Github repository name to build dropdown (#1340)
Browse files Browse the repository at this point in the history
* Add url to version dropdown in deploy form

* Display repository name in build dropdown

* Run scalafmt

* Pull out repository variable

---------

Co-authored-by: Julia Branke <[email protected]>
  • Loading branch information
marsavar and JuliaBrigitte authored May 20, 2024
1 parent a8830e0 commit 60eb09f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions riff-raff/app/controllers/DeployController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import play.api.i18n.I18nSupport
import play.api.libs.json.Json
import play.api.libs.ws.WSClient
import play.api.mvc.{AnyContent, BaseController, ControllerComponents}
import play.utils.UriEncoding
import resources.PrismLookup
import restrictions.RestrictionChecker
import software.amazon.awssdk.services.s3.model.GetObjectRequest
import utils.{ChangeFreeze, LogAndSquashBehaviour}
import utils.{ChangeFreeze, LogAndSquashBehaviour, VCSInfo}
import magenta.input.RiffRaffYamlReader

class DeployController(
Expand Down Expand Up @@ -183,9 +182,10 @@ class DeployController(
.successfulBuilds(project)
.filter(p => p.number.contains(term) || p.branchName.contains(term))
.map { build =>
val repository = VCSInfo.normalise(build.vcsURL).getOrElse(build.vcsURL)
val label =
"%s [%s] (%s)" format (build.number, build.branchName, shortFormat
.print(build.startTime))
"%s [%s] (%s) (%s)" format (build.number, build.branchName, shortFormat
.print(build.startTime), repository)
Map("label" -> label, "value" -> build.number)
}
Ok(Json.toJson(possibleProjects))
Expand Down

0 comments on commit 60eb09f

Please sign in to comment.