Skip to content
Snippets Groups Projects
index.mdx 1.78 KiB
Newer Older
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).

```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"
```

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.