1"use strict";(self.webpackChunkwoodpecker=self.webpackChunkwoodpecker||[]).push([["3659"],{42924(e,s,t){t.r(s),t.d(s,{metadata:()=>a,default:()=>p,frontMatter:()=>o,contentTitle:()=>d,toc:()=>c,assets:()=>i});var a=JSON.parse('{"id":"usage/badges","title":"Status Badges","description":"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.","source":"@site/versioned_docs/version-3.16/20-usage/80-badges.md","sourceDirName":"20-usage","slug":"/usage/badges","permalink":"/docs/3.16/usage/badges","draft":false,"unlisted":false,"editUrl":"https://github.com/woodpecker-ci/woodpecker/edit/main/docs/versioned_docs/version-3.16/20-usage/80-badges.md","tags":[],"version":"3.16","sidebarPosition":80,"frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Project settings","permalink":"/docs/3.16/usage/project-settings"},"next":{"title":"Advanced usage","permalink":"/docs/3.16/usage/advanced-usage"}}'),r=t(94686),n=t(23191);let o={},d="Status Badges",i={},c=[{value:"Badge endpoint",id:"badge-endpoint",level:2}];function u(e){let s={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"status-badges",children:"Status Badges"})}),"\n",(0,r.jsx)(s.p,{children:"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."}),"\n",(0,r.jsx)(s.h2,{id:"badge-endpoint",children:"Badge endpoint"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-uri",children:"<scheme>://<hostname>/api/badges/<repo-id>/status.svg\n"})}),"\n",(0,r.jsxs)(s.p,{children:["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 ",(0,r.jsx)(s.code,{children:"branch"})," query parameter."]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-diff",children:"-<scheme>://<hostname>/api/badges/<repo-id>/status.svg\n+<scheme>://<hostname>/api/badges/<repo-id>/status.svg?branch=<branch>\n"})}),"\n",(0,r.jsxs)(s.p,{children:["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.\nIf you'd like to respect other or further events, you can add the ",(0,r.jsx)(s.code,{children:"events"})," query parameter, otherwise the badge represents only the state of the last push event:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-diff",children:"-<scheme>://<hostname>/api/badges/<repo-id>/status.svg\n+<scheme>://<hostname>/api/badges/<repo-id>/status.svg?events=manual,cron\n"})})]})}function p(e={}){let{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},23191(e,s,t){t.d(s,{R:()=>o,x:()=>d});var a=t(92990);let r={},n=a.createContext(r);function o(e){let s=a.useContext(n);return a.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),a.createElement(n.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.