now with prs!

This commit is contained in:
Aria Blue 2023-08-02 19:14:37 -04:00
parent 3aefd79807
commit f33b52aa7d
No known key found for this signature in database
GPG key ID: E851AE999FFCBC37
2 changed files with 3 additions and 3 deletions

View file

@ -41,9 +41,9 @@ app.get('/:owner/:repo', async function (req, res) {
res.send(await render(html))
})
app.get('/:owner/:repo/issues/:num', async function (req, res) {
app.get('/:owner/:repo/:type/:num', async function (req, res) {
const issueResp = await fetch(
`https://git.gay/api/v1/repos/${req.params.owner}/${req.params.repo}/issues/${req.params.num}`
`https://git.gay/api/v1/repos/${req.params.owner}/${req.params.repo}/${req.params.type}/${req.params.num}`
)
const issue = await issueResp.json()
const html = await eta.renderAsync('issue', {

View file

@ -1,7 +1,7 @@
<div class="main">
<div class="contents">
<div class="info">
<p style="font-size: 36px; color: #9A8FA7;">@<%= it.issue.repository.full_name %></p>
<p style="font-size: 36px; color: #9A8FA7;">@<%= it.issue.repository?.full_name || it.issue.base.repo.full_name %></p>
<p style="font-weight: 800; font-size: 4.5rem; line-height: 1.2em;"><%= it.issue.title %></p>
<% if (it.issue.body) { %>
<p style="font-size: 42px; font-weight: 500; text-overflow: ellipsis; color: #9A8FA7; overflow: hidden; white-space: nowrap;"><%= it.issue.body %></p>