homu
homu copied to clipboard
Add a link to the GitHub repository for queue
This adds a link back to the GitHub repository for a project, from the queue.
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.
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'],