Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizencc authored and kellertk committed Sep 27, 2022
1 parent 83aba32 commit a8577b0
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,21 @@ steps:
ignore-usernames: '[kaizencc]'
```

### Badge Type
### Title Prefixes

This is an ad-hoc property that allows you to toggle between different types of badge
allocation mechanisms, now and in the future. The currently accepted values are `achievement`
(the default) and `leaderboard`.

If you specify `leaderboard`, then the Action returns badges related to _how a user compares to other contributors in the repository_. Consider the following example usage:
Specify a list of title prefixes that the Action should accept. For example, the below code
will only count PRs with titles that begin with `feat` or `fix`. It will ignore PRs with other
titles like `chore` or `refactor`.

```yaml
steps:
steps:
- uses: kaizencc/github-merit-badger@main
id: github-merit-badger
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
badges: '[1st! :trophy:,top 3 :fire:,top 5 :sunglasses:]'
thresholds: '[1,3,5]'
badge-type: 'leaderboard'
badges: '[first-time-contributor,repeat-contributor,allstar-contributor]'
thresholds: '[0,1,5]'
title-prefixes: '[feat,fix]'
```

When kaizencc@ submits a PR, the Action will find that he has submitted 25 lifetime PRs to the repository, which is good for 2nd place. kaizencc@ will thus receive the `top 3 :fire:` badge on their PR.
Expand Down

0 comments on commit a8577b0

Please sign in to comment.