You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Sponsor Labeler
v1.0.1
A GitHub Action that labels issues and pull requests if the creator is a sponsor, or belongs to an organization that is.
- name: ❤️ sponsor
uses: devlooped/actions-sponsor@v1
with:
# The label to apply to the issue or pull request.
# Defaults to "sponsor ❤️".
label: ''
# The label to apply when sponsor amount is above the gold-amount.
# Defaults to "sponsor 💛".
gold-label: ''
# Sponsors over this amount are labeled with gold-label instead.
# Defaults to 100.
gold-amount: ''
# The account to check for sponsorship.
# Defaults to the repository owner `${{ github.repository.owner }}`
sponsorable: ''
# The token to use for querying the GitHub API for sponsorship information.
# Typically set to ${{ secrets.GH_TOKEN }}.
token: ''
NOTE: in order to detect the sponsorship tier to trigger gold sponsor labeling, the token must be an owner of the sponsorable organization. Otherwise, only
base sponsoring is detected.
Minimal example, using default labels, repo owner and gold label threshold:
name: sponsor ❤️
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 (and running on all issue/PR events):
name: sponsor ❤️
on: [issues, pull_request]
jobs:
sponsor:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
- name: ❤️ sponsor
uses: devlooped/actions-sponsor@v1
with:
label: sponsor
gold-label: gold sponsor
gold-amount: 1000
sponsorable: moq
token: ${{ secrets.MOQ_TOKEN }}
Note: the provided token must have access to retrieve sponsorships for the sponsorable account.