homu icon indicating copy to clipboard operation
homu copied to clipboard

Add a link to the GitHub repository for queue

Open mrmonday opened this issue 9 years ago • 2 comments

This adds a link back to the GitHub repository for a project, from the queue.

mrmonday avatar Jun 14 '15 16:06 mrmonday

This might not be the best place for a link, and it might not be the best way to do it if there are plans to support non-github repositories in future, I figured I'd throw the change together though since it's a one-liner and I'd find it useful.

mrmonday avatar Jun 14 '15 16:06 mrmonday

It looks like repo_url is tied to the state and isn't available at the higher level.

I'm not familiar enough yet with the github3 library but something like this might work:

+++ b/homu/html/queue.html
@@ -30,7 +30,7 @@
         </style>
     </head>
     <body>
-        <h1>Homu queue - {{repo_label}}</h1>
+        <h1>Homu queue - {{repo_url}}</h1>

         <p>
             <button type="button" id="rollup">Create a rollup</button>
diff --git a/homu/server.py b/homu/server.py
index 25f06fa..66dd66a 100644
--- a/homu/server.py
+++ b/homu/server.py
@@ -81,6 +81,7 @@ def queue(repo_label):
         })

     return g.tpls['queue'].render(
+        repo_url = g.repos[repo_label].html_url,
         repo_label = repo_label,
         states = rows,
         oauth_client_id = g.cfg['github']['app_client_id'],

ashcrow avatar Mar 18 '16 18:03 ashcrow