8000 GitHub - devlooped/actions-sponsor: A GitHub Action that labels issues and pull requests if the creator is a sponsor.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A GitHub Action that labels issues and pull requests if the creator is a sponsor.

License

Notifications You must be signed in to change notification settings

devlooped/actions-sponsor

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’œ sponsor

A GitHub Action that labels issues and pull requests if the creator is a sponsor, or belongs to an organization that is.

Usage

- 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.

Example

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
    if: ${{ !endsWith(github.event.sender.login, '[bot]') && !endsWith(github.event.sender.login, 'bot') }}      
    steps:
      - name: 🀘 checkout
        uses: actions/checkout@v2
    
      - name: πŸ’œ sponsor 
        uses: devlooped/actions-sponsor@v1
        with:
          token: ${{ secrets.GH_TOKEN }}

NOTE: you will typically want to skip running the workflow at all for bot accounts, hence the if above.

Full example overriding all values (and running on all issue/PR events):

name: sponsor πŸ’œ
on: [issues, pull_request]

jobs:
  sponsor:
    runs-on: ubuntu-latest
    if: ${{ !endsWith(github.event.sender.login, '[bot]') && !endsWith(github.event.sender.login, 'bot') }}      
    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.

Sponsors

Clarius Org MFB Technologies, Inc. Torutek DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Toni Wenzel Uno Platform Dan Siegel Reuben Swartz Jacob Foshee Eric Johnson David JENNI Jonathan Charley Wu Ken Bonny Simon Cropp agileworks-eu sorahex Zheyu Shen Vezel ChilliCream 4OTC Vincent Limo Jordan S. Jones domischell Mauricio Scheffer Justin Wendlandt Adrian Alonso Michael Hagedorn

Sponsor this project Β 

Learn more about GitHub Sponsors

About

A GitHub Action that labels issues and pull requests if the creator is a sponsor.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  
0