-
-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add Buy Me a Coffee sponsorship support #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # GitHub Sponsorship Configuration | ||
| # These are supported funding model platforms for gh-manager-cli | ||
|
|
||
| # GitHub Sponsors (preferred platform for recurring sponsorships) | ||
| # Commented out until approved by GitHub | ||
| # github: wiiiimm | ||
|
|
||
| # Ko-fi (Buy Me Coffee alternative) - popular micro-donation platform | ||
| # Uncomment and add your Ko-fi username when ready: | ||
| # ko_fi: wiiiimm | ||
|
|
||
| # Custom funding URLs - for Buy Me a Coffee and other platforms (max 4 URLs) | ||
| custom: | ||
| - https://buymeacoffee.com/wiiiimm | ||
| # - https://www.paypal.me/wiiiimm | ||
|
|
||
| # Additional supported platforms (uncomment and configure as needed): | ||
| # patreon: your-patreon-username # Subscription-based funding | ||
| # open_collective: your-project-name # Transparent funding for open source | ||
| # tidelift: npm/gh-manager-cli # Enterprise open source funding | ||
| # community_bridge: your-project-name # Linux Foundation funding platform | ||
| # liberapay: your-liberapay-username # European recurring donations | ||
| # issuehunt: your-issuehunt-username # Funding for specific GitHub issues | ||
| # otechie: your-otechie-username # Technical consulting platform | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # GitHub Sponsorship Configuration Guide | ||
|
|
||
| This document explains how to support the gh-manager-cli project through Buy Me a Coffee. | ||
|
|
||
| ## Current Sponsorship Platform | ||
|
|
||
| ### Buy Me a Coffee ☕ | ||
| - **URL:** [buymeacoffee.com/wiiiimm](https://buymeacoffee.com/wiiiimm) | ||
| - **Type:** One-time and recurring donations | ||
| - **Description:** Simple way to support the project with coffee donations | ||
| - **Benefits:** | ||
| - Quick one-time donations | ||
| - Monthly membership options | ||
| - No complex setup required | ||
| - Widely recognized platform | ||
|
|
||
| ## How It Works | ||
|
|
||
| 1. **GitHub Integration:** The "Sponsor" button appears on the repository page | ||
| 2. **Direct Link:** Clicking takes you to the Buy Me a Coffee page | ||
| 3. **Support Options:** Choose one-time or monthly support | ||
| 4. **Payment:** Secure payment through Buy Me a Coffee's platform | ||
|
|
||
| ## Configuration Details | ||
|
|
||
| The sponsorship is configured through GitHub's `FUNDING.yml` file located at `.github/FUNDING.yml`: | ||
|
|
||
| ```yaml | ||
| custom: | ||
| - https://buymeacoffee.com/wiiiimm | ||
| ``` | ||
|
|
||
| This configuration enables the "Sponsor" button on the repository page. | ||
|
|
||
| ## Why Support This Project? | ||
|
|
||
| Your support helps: | ||
| - 🚀 Maintain and improve gh-manager-cli | ||
| - 🐛 Fix bugs and add new features | ||
| - 📚 Keep documentation up-to-date | ||
| - 💻 Support ongoing development | ||
|
|
||
| Every coffee counts and is greatly appreciated! ☕ | ||
|
|
||
| ## Thank You! | ||
|
|
||
| A huge thank you to everyone who supports this project. Your contributions help keep gh-manager-cli free and open source for everyone. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| import { describe, it, expect } from 'vitest'; | ||
| import { readFileSync, existsSync } from 'fs'; | ||
| import { join } from 'path'; | ||
|
|
||
| describe('GitHub Sponsorship Configuration', () => { | ||
| const fundingYmlPath = join(process.cwd(), '.github', 'FUNDING.yml'); | ||
| const sponsorshipDocsPath = join(process.cwd(), 'docs', 'SPONSORSHIP_PLATFORMS.md'); | ||
|
|
||
| it('should have a FUNDING.yml file in .github directory', () => { | ||
| expect(existsSync(fundingYmlPath)).toBe(true); | ||
| }); | ||
|
|
||
| it('should have Buy Me a Coffee configured', () => { | ||
| const content = readFileSync(fundingYmlPath, 'utf8'); | ||
| expect(content).toContain('buymeacoffee.com/wiiiimm'); | ||
| expect(content).toContain('custom:'); | ||
| }); | ||
|
|
||
| it('should contain Ko-fi configuration examples', () => { | ||
| const content = readFileSync(fundingYmlPath, 'utf8'); | ||
| expect(content).toContain('ko_fi'); | ||
| expect(content).toContain('Buy Me Coffee alternative'); | ||
| }); | ||
|
|
||
| it('should contain custom URL examples for Buy Me a Coffee', () => { | ||
| const content = readFileSync(fundingYmlPath, 'utf8'); | ||
| expect(content).toContain('buymeacoffee.com'); | ||
| expect(content).toContain('custom'); | ||
| }); | ||
|
|
||
| it('should list all supported platforms in comments', () => { | ||
| const content = readFileSync(fundingYmlPath, 'utf8'); | ||
| const expectedPlatforms = [ | ||
| 'patreon', | ||
| 'open_collective', | ||
| 'tidelift', | ||
| 'community_bridge', | ||
| 'liberapay', | ||
| 'issuehunt', | ||
| 'otechie' | ||
| ]; | ||
|
|
||
| expectedPlatforms.forEach(platform => { | ||
| expect(content).toContain(platform); | ||
| }); | ||
| }); | ||
|
|
||
| it('should have comprehensive sponsorship documentation', () => { | ||
| expect(existsSync(sponsorshipDocsPath)).toBe(true); | ||
|
|
||
| const content = readFileSync(sponsorshipDocsPath, 'utf8'); | ||
| expect(content).toContain('GitHub Sponsorship Platforms Guide'); | ||
| expect(content).toContain('Ko-fi (Buy Me Coffee Alternative)'); | ||
| expect(content).toContain('Custom URLs (Including Buy Me a Coffee)'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Documentation Mismatch and Missing ContentThe |
||
| }); | ||
|
|
||
| it('should have proper YAML structure', () => { | ||
| const content = readFileSync(fundingYmlPath, 'utf8'); | ||
|
|
||
| // Should not have syntax errors - basic checks | ||
| expect(content).not.toContain('syntax error'); | ||
| expect(content).toMatch(/github:\s+wiiiimm/); | ||
|
|
||
| // Should have proper commenting for inactive platforms | ||
| const lines = content.split('\n'); | ||
| const commentedPlatforms = lines.filter(line => | ||
| line.trim().startsWith('#') && | ||
| (line.includes('ko_fi:') || line.includes('patreon:') || line.includes('custom:')) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ); | ||
|
|
||
| expect(commentedPlatforms.length).toBeGreaterThan(0); | ||
| }); | ||
|
|
||
| it('should reference sponsorship documentation in README', () => { | ||
| const readmePath = join(process.cwd(), 'README.md'); | ||
| const content = readFileSync(readmePath, 'utf8'); | ||
|
|
||
| expect(content).toContain('Support & Sponsorship'); | ||
| expect(content).toContain('GitHub Sponsors'); | ||
| expect(content).toContain('Ko-fi'); | ||
| expect(content).toContain('Buy Me a Coffee'); | ||
| expect(content).toContain('SPONSORSHIP_PLATFORMS.md'); | ||
| }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }); | ||
Uh oh!
There was an error while loading. Please reload this page.