Skip to content

Commit

Permalink
chore: introduce github merit badger workflow (#21898)
Browse files Browse the repository at this point in the history
See [merit badger readme](https://github.com/kaizencc/github-merit-badger#readme) for an overview of the github action that is introduced in this PR.

The idea is that a "merit badge" will be applied to every incoming PR via label based on prior (successfully merged) contributions to the CDK. The badges are as follows:

- `beginning-contributor`: contributed between 0-2 PRs to the CDK
- `repeat-contributor`: contributed between 3-5 PRs to the CDK
- `valued-contributor`: contributed between 6-12 PRs to the CDK
- `admired-contributor`: contributed between 13-24 PRs to the CDK
- `star-contributor`: contributed between 25-49 PRs to the CDK
- `distinguished-contributor`: contributed 50+ PRs to the CDK

We will **not** label PRs that come from the core team.

Special thanks to @scanlonp and @Tianyi-W if/when this does get merged.
  • Loading branch information
kaizencc authored Sep 21, 2022
1 parent ce59b6a commit edfd3e2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ Owner: Core CDK team
[issue-label-assign.yml](issue-label-assign.yml): Github action for automatically adding labels and/or setting assignees when an Issue or PR is opened or edited based on user-defined Area
Owner: CDK support team

### PR Labeler
[pr-labeler.yml](pr-labeler.yml): GitHub action for automatically porting triage labels from issues
linked in the PR description to the PR.
Owner: Core CDK team

### GitHub Merit Badger
[github-merit-badger.yml](github-merit-badger.yml): GitHub action that adds 'merit badges' to pull
requests based on the users prior contributions to the CDK.
Owner: Core CDK team

## Issue Triggered

### Closed Issue Message
Expand All @@ -44,4 +54,9 @@ Owner: CDK support team
### Yarn Upgrader
[yarn-upgrade.yml](yarn-upgrade.yml): Upgrades yarn dependencies and creates a
patch file for downloading.
Owner: Core CDK team

### Issue Reprioritizer
[issue-reprioritization.yml](issue-reprioritization.yml): GitHub action that labels `p2`
issues as `p1` if a certain level of community engagement is met.
Owner: Core CDK team
20 changes: 20 additions & 0 deletions .github/workflows/github-merit-badger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: github-merit-badger
on:
pull_request_target:
types:
- opened

jobs:
call-action:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: kaizencc/github-merit-badger@main
id: merit-badger
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
thresholds: '[0,3,6,13,25,50]'
badge-type: 'achievement'
ignore-usernames: '[RomainMuller,rix0rrr,Jerry-AWS,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain]'

0 comments on commit edfd3e2

Please sign in to comment.