https://github.com/santoshyadavdev/sponsorship-green-squares
This GitHub Action fetches the sponsorships of a user or organization and commits the data to the repository. It helps in tracking and visualizing sponsorships over time.
https://github.com/santoshyadavdev/sponsorship-green-squares
sponsors sponsorship
Last synced: 7 months ago
JSON representation
This GitHub Action fetches the sponsorships of a user or organization and commits the data to the repository. It helps in tracking and visualizing sponsorships over time.
- Host: GitHub
- URL: https://github.com/santoshyadavdev/sponsorship-green-squares
- Owner: santoshyadavdev
- License: mit
- Created: 2025-01-11T12:22:50.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-10T16:50:28.000Z (7 months ago)
- Last Synced: 2025-03-15T12:35:45.906Z (7 months ago)
- Topics: sponsors, sponsorship
- Language: TypeScript
- Homepage:
- Size: 2.31 MB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Sponsorship Green Squares
[](https://github.com/super-linter/super-linter)

[](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml)
[](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml)
[](./badges/coverage.svg)This GitHub Action fetches the sponsorships of a user or organization and
commits the data to the repository. It helps in tracking and visualizing
sponsorships over time.## Usage
To use this action, create a workflow file (e.g.,
`.github/workflows/sponsorship.yml`) in your repository with the following
content:```yaml
name: Fetch Sponsorships and Commiton:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
workflow_dispatch:jobs:
fetch-and-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4- name: Fetch Sponsorships and Commit
uses: santoshyadavdev/sponsorship-green-squares@main
with:
allow-add-to-readme: 'false' # Default value, set to 'true' to enable README updates
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
# do not use GITHUB_TOKEN as it lacks the permission to call graphql APIs,
#create a new Personal Access TOKEN and provide read:org access to read to sponsorship data
```### Readme Integration
When `allow-add-to-readme` is set to 'true', the action will update your
README.md with sponsorship data. Add these markers where you want the data to
appear:```markdown
```
The action will automatically insert sponsorship data between these markers in
the format:- @username-1: 5 USD
- @username-2: 10 USD### Inputs
1. GH_USERNAME: Your GitHub username (default: ${{ github.repository_owner }})
## Initial Setup
After you've cloned the repository to your local machine or codespace, you'll
need to perform some initial setup steps before you can develop your action.> [!NOTE]
>
> You'll need to have a reasonably modern version of
> [Node.js](https://nodejs.org) handy (20.x or later should work!). If you are
> using a version manager like [`nodenv`](https://github.com/nodenv/nodenv) or
> [`fnm`](https://github.com/Schniz/fnm), this template has a `.node-version`
> file at the root of the repository that can be used to automatically switch to
> the correct version when you `cd` into the repository. Additionally, this
> `.node-version` file is used by GitHub Actions in any `actions/setup-node`
> actions.1. :hammer_and_wrench: Install the dependencies
```bash
npm install
```1. :building_construction: Package the TypeScript for distribution
```bash
npm run bundle
```1. :white_check_mark: Run the tests
```bash
npm test
```## Update the Action Metadata
The [`action.yml`](action.yml) file defines metadata about your action, such as
input(s) and output(s). For details about this file, see
[Metadata syntax for GitHub Actions](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions).When you copy this repository, update `action.yml` with the name, description,
inputs, and outputs for your action.