forgejo/models
Gergely Nagy 4359741431
[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)
(cherry picked from commit 20d14f7844)
2024-01-15 16:51:45 +00:00
..
actions [GITEA] Add support for shields.io-based badges 2024-01-15 16:51:45 +00:00
activities
admin
asymkey
auth [GITEA] Fix session generation for database (squash) timeutil.Mock 2024-01-15 16:48:44 +00:00
avatars
db
dbfs
fixtures
forgejo/semver
forgejo_migrations [GITEA] Optionally allow anyone to edit Wikis 2024-01-15 16:48:44 +00:00
git
issues [GITEA] Avoid WHERE IN for comment migration query 2024-01-15 16:48:44 +00:00
migrations [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-01-15 16:11:59 +00:00
organization
packages
perm [GITEA] Optionally allow anyone to edit Wikis 2024-01-15 16:48:44 +00:00
project
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-01-15 16:47:16 +00:00
repo [GITEA] Optionally allow anyone to edit Wikis 2024-01-15 16:48:44 +00:00
secret
shared/types
system
unit
unittest
user [GITEA] Allow changing the email address before activation 2024-01-15 16:47:16 +00:00
webhook
error.go
fixture_generation.go
fixture_test.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_test.go
repo_transfer.go
repo_transfer_test.go