0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-23 22:35:55 -05:00
forgejo/modules
Gergely Nagy 20d14f7844
[GITEA] Add support for shields.io-based badges
Adds a new `/{username}/{repo}/badges` family of routes, which redirect
to various shields.io badges. The goal is to not reimplement badge
generation, and delegate it to shields.io (or a similar service), which
are already used by many. This way, we get all the goodies that come
with it: different styles, colors, logos, you name it.

So these routes are just thin wrappers around shields.io that make it
easier to display the information we want. The URL is configurable via
`app.ini`, and is templatable, allowing to use alternative badge
generator services with slightly different URL patterns.

Additionally, for compatibility with GitHub, there's an
`/{username}/{repo}/actions/workflows/{workflow_file}/badge.svg` route
that works much the same way as on GitHub. Change the hostname in the
URL, and done.

Fixes gitea#5633, gitea#23688, and also fixes #126.

Work sponsored by Codeberg e.V.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit fcd0f61212)
2024-01-08 17:12:01 +01:00
..
actions [ACTIONS] on.schedule: the event is always "schedule" 2024-01-08 17:05:47 +01:00
activitypub Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
analyze
assetfs
auth [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
avatar [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
base [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
cache Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
charset Add option to disable ambiguous unicode characters detection (#28454) 2023-12-17 14:38:54 +00:00
container
context [SECURITY] Rework long-term authentication 2024-01-08 14:01:19 +01:00
contexttest
csv
doctor [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-01-08 17:05:47 +01:00
emoji
eventsource
generate
git [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
gitgraph
graceful Suggest to use Type=simple for systemd service (#28717) 2024-01-07 15:18:04 +00:00
hcaptcha
highlight Add option to disable ambiguous unicode characters detection (#28454) 2023-12-17 14:38:54 +00:00
hostmatcher
html
httpcache
httplib
indexer [CI] disable meilisearch/elasticsearch test, no server yet in CI 2024-01-08 13:37:01 +01:00
issue/template
json
label
lfs [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
log
markup [GITEA] Add footnote testing 2024-01-08 17:05:47 +01:00
mcaptcha
metrics
migration
nosql
options
packages Close all hashed buffers (#27787) 2023-10-25 21:24:24 +02:00
paginator
pprof
private [CLI] implement forgejo-cli 2024-01-08 13:37:00 +01:00
process
proxy
proxyprotocol
public Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00
queue [CI] disable redis test, no redis server yet in CI 2024-01-08 13:37:01 +01:00
recaptcha
references Make cross-reference issue links work in markdown documents again (#28682) 2024-01-03 14:01:12 +08:00
regexplru
repository Make offline mode as default to no connect external avatar service by default (#28548) 2023-12-21 07:42:16 +00:00
secret [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
session
setting [GITEA] Add support for shields.io-based badges 2024-01-08 17:12:01 +01:00
sitemap
ssh Remove SSH workaround (#27893) 2023-11-03 15:21:05 +00:00
storage [CI] Forgejo Actions based CI for PR & branches 2024-01-08 13:37:01 +01:00
structs [ACTIONS] on.schedule: create a new payload 2024-01-08 17:05:48 +01:00
svg
sync
system
templates Render PyPi long description as document (#28272) 2023-12-05 15:02:01 +00:00
test
testlogger
timeutil Make template DateTime show proper tooltip (#28677) 2024-01-02 20:09:18 +01:00
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util [GITEA] Drop sha256-simd in favor of stdlib 2024-01-08 16:59:19 +01:00
validation [GITEA] add option for banning dots in usernames 2024-01-08 16:52:44 +01:00
web [GITEA] Configurable clone methods 2024-01-08 17:05:48 +01:00
webhook [ACTIONS] on.schedule: the event is always "schedule" 2024-01-08 17:05:47 +01:00