An open API service indexing awesome lists of open source software.

https://github.com/inrixia/cf-gh-sponsors

Small workers api for fetching public sponsors
https://github.com/inrixia/cf-gh-sponsors

Last synced: 10 months ago
JSON representation

Small workers api for fetching public sponsors

Awesome Lists containing this project

README

          

# Cloudflare GitHub Sponsors

Cloudflare Workers application that fetches GitHub sponsors, filters to return only those that are publicly visible.

## Setup Instructions

1. **Clone the repository:**

```bash
git clone https://github.com/Inrixia/cf-gh-sponsors.git
cd cf-gh-sponsors
```

2. **Install dependencies:**

```bash
pnpm install
```

3. **Create a GitHub Personal Access Token and set it as a secret using Wrangler:**

- Go to [GitHub Personal Access Tokens](https://github.com/settings/tokens) and click **"Generate new token"**.
- Give your token a name and expiration.
- Under **Permissions**, check:
- **User**:
- `Read all user profile data` (Allows reading all user profile data, including private email addresses)
- Generate the token and copy it.

Use the following command to securely store your GitHub token as a secret in your Cloudflare Worker environment:

```bash
npx wrangler secret put GITHUB_TOKEN
```

4. **Deploy the Worker:**
Use Wrangler to deploy your Cloudflare Worker:
```bash
npx wrangler deploy
```

## Usage

Once deployed, you can call the endpoint to fetch publicly visible GitHub sponsors. The endpoint will return a JSON response containing the filtered list of sponsors.