clarified signature;
authorwenzelm
Wed, 18 Dec 2019 18:59:16 +0100
changeset 71311 e169a04e4d3b
parent 71310 fd644fb7871b
child 71312 937328d61436
clarified signature;
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)
     }
   }