0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-14 18:40:59 -05:00
forgejo/modules/setting
Gergely Nagy 2fc0d0b8a3
[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)
(cherry picked from commit 4359741431)
(cherry picked from commit 35cff45eb8)
2024-01-28 10:55:00 +01:00
..
config
actions.go [CI] DEFAULT_ACTIONS_URL = https://code.forgejo.org 2024-01-28 07:47:32 +01:00
actions_test.go [CI] DEFAULT_ACTIONS_URL = https://code.forgejo.org 2024-01-28 07:47:32 +01:00
admin.go [GITEA] notifies admins on new user registration 2024-01-28 10:47:53 +01:00
api.go
asset_dynamic.go
asset_static.go
attachment.go Fix incorrect default value of [attachment].MAX_SIZE (#28373) 2023-12-06 10:59:56 -05:00
attachment_test.go
badges.go [GITEA] Add support for shields.io-based badges 2024-01-28 10:55:00 +01:00
cache.go Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
camo.go
config.go
config_env.go
config_env_test.go
config_provider.go [GITEA] add GetFile to config provider 2024-01-28 08:19:25 +01:00
config_provider_test.go
cors.go Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00
cron.go
cron_test.go
database.go [GITEA] Add slow SQL query warning 2024-01-28 09:22:15 +01:00
database_sqlite.go
database_test.go Fix incorrect PostgreSQL connection string for Unix sockets (#28865) 2024-01-20 16:04:47 +00:00
federation.go
forgejo_storage_test.go [TESTS] verify facts for the admin storage documentation 2024-01-28 08:19:25 +01:00
git.go
git_test.go
highlight.go
i18n.go
incoming_email.go
indexer.go
indexer_test.go
lfs.go
lfs_test.go
log.go
log_test.go
mailer.go
mailer_test.go
markup.go
metrics.go
migrations.go
mime_type_map.go
mirror.go
oauth2.go Normalize oauth email username (#28561) 2024-01-03 18:48:20 -06:00
other.go
packages.go
packages_test.go
path.go
path_test.go
picture.go
project.go
proxy.go
queue.go
repository.go [GITEA] Configurable clone methods 2024-01-28 10:55:00 +01:00
repository_archive.go
repository_archive_test.go
security.go Warn that DISABLE_QUERY_AUTH_TOKEN is false only if it's explicitly defined (#28783) 2024-01-14 21:20:18 +01:00
server.go Avoid cycle-redirecting user/login page (#28636) 2023-12-30 08:48:34 +00:00
service.go [GITEA] add option for banning dots in usernames 2024-01-28 09:22:15 +01:00
service_test.go
session.go
setting.go [GITEA] Add support for shields.io-based badges 2024-01-28 10:55:00 +01:00
setting_test.go
ssh.go
storage.go
storage_test.go
task.go
time.go
ui.go Add global setting how timestamps should be rendered (#28657) 2024-01-02 09:25:30 +08:00
webhook.go