diff -r fd644fb7871b -r e169a04e4d3b src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Wed Dec 18 16:31:42 2019 +0100 +++ b/src/Pure/Tools/phabricator.scala Wed Dec 18 18:59:16 2019 +0100 @@ -908,6 +908,12 @@ }))) } + def the_repository(phid: String): API.Repository = + get_repositories(phid = phid) match { + case List(repo) => repo + case _ => error("Bad repository " + quote(phid)) + } + def create_repository( name: String, callsign: String = "", // unique name, UPPERCASE @@ -934,10 +940,7 @@ execute("diffusion.looksoon", params = JSON.Object("repositories" -> List(phid))).get - get_repositories(phid = phid) match { - case List(repo) => repo - case _ => error("Failed to access new repository: " + quote(phid)) - } + the_repository(phid) } }