Skip to content

Add a link to the GitHub repository for queue#84

Open
mrmonday wants to merge 1 commit intobarosl:masterfrom
mrmonday:patch-1
Open

Add a link to the GitHub repository for queue#84
mrmonday wants to merge 1 commit intobarosl:masterfrom
mrmonday:patch-1

Conversation

@mrmonday
Copy link

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

This adds a link back to the GitHub repository for a project, from the queue.
@mrmonday
Copy link
Author

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.

@ashcrow
Copy link

ashcrow commented Mar 18, 2016

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'],

Manishearth added a commit to Manishearth/homu that referenced this pull request Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments