Newer
Older

Sebastian Kawelke
committed
import { Callout } from 'nextra/components'
# Configuration
<Callout type="info">
You can find the configuration file of the official instance [here →](https://gitlab.opencode.de/open-code/badgebackend/badge-api/-/blob/main/.badge-api.yaml)
</Callout>
The `.badge-api.yaml` configuration file defines a list of badges, their levels and their criteria. The file is structured as follows.
Find an overview of the implemented checks [here →](/concepts/implemented-checks).<br />
Details about manual checks can be found [here →](/concepts/configuration/manual-checks).

Sebastian Kawelke
committed
```yaml filename=".badge-api.yaml" copy
badges:
- id: your-badge-name
description: "Description of this badge"
# ORDERED list of levels of your badge (e.g. bronze, silver, gold)
levels:
- name: level-1-name
svgUrl: https://gitlab.opencode.de/.../raw/main/assets/badge-xy-level-1.svg
# Optional - if true, the checks of this level are not necessary for the next higher level, default is false
notNecessaryForNextHigherLevels: true
description: "Description of the level"
# List of checks for this level, these can be one of the implemented types (see /implemented-checks) or of type MANUAL
checks:
- type: PACKAGES
description: "Describe the check in context of your badge and level"
# sense of these options depends on the check
threshold:
timeRangeInMonths: 6
min: 1
max: 3
- type: MANUAL
description: "Description of the manual check"
# For more details see /concepts/configuration/manual-checks
# URL to the JSON file that contains a list of granted projects or a regex pattern for granted projects
decisionJsonUrl: "https://gitlab.opencode.de/.../raw/main/badges/manual-check.json"
```