Right now the description gets set to an empty string if no input is
specified instead of "null". In comparison updating a repository handles
it correctly [1].
[1]: f3df3ac3f1/item/gitsrht/blueprints/manage.py (L120)
Adds a `Content-Type` header to image files.
This allows images to be rendered by the browser.
In particular, it allows SVGs to be used in READMEs.
I have restricted this feature to only work on image files for now,
but it might make sense to send this header for other file types as
well if we can reasonably assume that the browser is able to render
it, such as PDFs and XML documents.
Currently, gitsrht_periodic pushes metrics to the pushgateway using only
job="git.sr.ht" as a grouping key. This will overwrite _any_ metrics
that have been pushed using the same key. This includes for example the
certificate expiration.
A discussion could be had about using more specific grouping keys for
the various different jobs, but for now I think it is most sensible to
simply use `_pushadd` instead of `_push` to preserve other metrics
pushed with the same key by other jobs. This is also the behavior when
using a plain `curl` to push data, as curl will default to POST. The
`_push` method behavior is that of PUT request instead.
Here is the relevant section of the Python client README:
https://github.com/prometheus/client_python#exporting-to-a-pushgateway
And here is more detailed explanation of the POST vs. PUT semantics:
https://github.com/prometheus/pushgateway#api
The SQLAlchemy documentation doesn't state that the `name`
keyword-argument is required but on my setup without this patch
git.sr.ht crashes immediately on start.
Only join with access entries if the second condition of the OR
condition in the WHERE clause (i.e. `repo.visibility = 'PUBLIC') is
false, which prevents WHERE from short-circuiting for every row.
This reverts commit 390e609e53.
The approach was too heavy-handed. It messes with folks who use <del> in
their README. The commit that introduced the issue that the reverted
commit was trying to address has itself been reverted.
This reverts commit b75d2f0e03.
This commit has some issues:
- It uses <ins>/<del> not for the content that was actually
added/removed (i.e. the diff), but for the line stats. I don't think
that helps accessibility, it might actually make it worse.
- It adds some CSS to apply text decoration to <ins>/<del>, but only
inside the `diff` class. However, the elements never occur inside the
`diff` class (see first item). The CSS is never used.
- Instead, the place where it was used (line stats) got unintended text
decoration applied, causing a follow-up commit which fixed this the
wrong way, causing yet more issues (fixed in next commit).
I think the one place where it would make sense to apply <ins>/<del> is
the diff itself, but that might be a more serious operation.
The mailmap file is consulted to obtain the canonical name/email of an
author or committer of a commit, or a tagger of a tag.
Signed-off-by: Sebastian <sebastian@sebsite.pw>
This is a partial revert of fd8cca2e. It fixes a bug where, for example, viewing
a README file on a blob page results in no bottom margin for <pre>s at all, and
no bottom padding on the body. Adding bottom padding to the body also improves
the experience on mobile.
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
Browsers usually render a <del> tag with a strike-through. However,
strike-through makes the number of deletions in a file unreadable as
well as the number of additions is rendered with an underline. This
commit fixes the issue by using underline for the <del> tag.
The collapsed summary color was low contrast, and the expanded summary
color was almost invisible (black on dark gray). There currently is no
uncolored text inside a details tag, but such text would also have been
black.