Skip to content

Commit

Permalink
Update samples since checkout is required
Browse files Browse the repository at this point in the history
Also use fewer event types by default
  • Loading branch information
kzu committed Aug 12, 2022
1 parent 30b960f commit b2d54e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,26 @@ Minimal example, using default labels, repo owner and gold label threshold:

```yml
name: sponsor ❤️
on: [issues, pull_request]
on:
issues:
types: [opened, edited, reopened]
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
sponsor:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2

- name: ❤️ sponsor
uses: devlooped/actions-sponsor@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
Full example overriding all values:
Full example overriding all values (and running on *all* issue/PR events):
```yml
name: sponsor ❤️
Expand All @@ -63,6 +69,9 @@ jobs:
sponsor:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2

- name: ❤️ sponsor
uses: devlooped/actions-sponsor@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion sponsor-labeler.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ gh label create "$env:SPONSOR_LABEL" -c '#D4C5F9' -d 'Sponsor' || & { $global:LA
$gold = [int]$env:SPONSOR_GOLD_AMOUNT
$label = if ([int]$amount -ge $gold) { $env:SPONSOR_GOLD_LABEL } else { $env:SPONSOR_LABEL }

Write-Output "Adding $label label to $env:SPONSOR_ISSUE."
Write-Output "Adding $label label to #$env:SPONSOR_ISSUE."
gh issue edit $env:SPONSOR_ISSUE --add-label "$label"

0 comments on commit b2d54e0

Please sign in to comment.