Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/0.1.0b2'
Browse files Browse the repository at this point in the history
  • Loading branch information
shomatan committed May 23, 2018
2 parents 77e6586 + 21a1b31 commit 8455467
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name := "backlog-migration-cybozulive"

lazy val commonSettings = Seq(
version := "0.1.0b1",
version := "0.1.0b2",
scalaVersion := "2.12.6",
libraryDependencies ++= Seq(
"org.fusesource.jansi" % "jansi" % "1.17",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

app {
name = "Backlog Migration for CybozuLive"
version = "0.1.0b1"
version = "0.1.0b2"
title = ${app.name} ${app.version} (c) nulab.inc
fileName = backlog-migration-cybozulive-${app.version}.jar
language = default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,19 @@ object MappingFiles {
def createMappingContext(): AppProgram[MappingContext] =
for {
userMappingStream <- read(Config.USERS_PATH)
users <- AppDSL.streamAsSeq(userMappingStream).orFail
userMappings = indexSeqToHashMap(users)
userNames <- AppDSL.streamAsSeq(userMappingStream).orFail
backlogUserStream <- AppDSL.fromStore(StoreDSL.getBacklogUsers)
backlogUsers <- AppDSL.streamAsSeq(backlogUserStream).orFail
userHashMap = userNames.map {
case (cybozu, backlog) =>
val backlogUserId = backlogUsers
.find(_.name == backlog)
.getOrElse(throw new RuntimeException("It never happen. It has already validated."))
.userId
.getOrElse(throw new RuntimeException("It never happen. Admin user can get userId."))
(cybozu, backlogUserId)
}
userMappings = indexSeqToHashMap(userHashMap)
priorityMappingStream <- read(Config.PRIORITIES_PATH)
priorities <- AppDSL.streamAsSeq(priorityMappingStream).orFail
priorityMappings = indexSeqToHashMap(priorities)
Expand Down

0 comments on commit 8455467

Please sign in to comment.