Files
woodpecker/docs/versioned_docs/version-3.13/20-usage/80-badges.md
qwerty287 cda7c8e474 Add 3.13 docs (#5939)
Co-authored-by: 6543 <6543@obermui.de>
2026-01-11 13:07:43 +02:00

25 lines
1.0 KiB
Markdown

# Status Badges
Woodpecker has integrated support for repository status badges. These badges can be added to your website or project readme file to display the status of your code.
## Badge endpoint
```uri
<scheme>://<hostname>/api/badges/<repo-id>/status.svg
```
The status badge displays the status for the latest build to your default branch (e.g. main). You can customize the branch by adding the `branch` query parameter.
```diff
-<scheme>://<hostname>/api/badges/<repo-id>/status.svg
+<scheme>://<hostname>/api/badges/<repo-id>/status.svg?branch=<branch>
```
By default status badges do not include pull request results, since the status of a pull request does not provide an accurate representation of your repository state.
If you'd like to respect other or further events, you can add the `events` query parameter, otherwise the badge represents only the state of the last push event:
```diff
-<scheme>://<hostname>/api/badges/<repo-id>/status.svg
+<scheme>://<hostname>/api/badges/<repo-id>/status.svg?events=manual,cron
```