Skip to content

feat: add Buy Me a Coffee sponsorship support#27

Merged
wiiiimm merged 3 commits into
mainfrom
copilot/fix-e22ecaff-82b4-4646-bc1e-c4ec91938b8f
Sep 6, 2025
Merged

feat: add Buy Me a Coffee sponsorship support#27
wiiiimm merged 3 commits into
mainfrom
copilot/fix-e22ecaff-82b4-4646-bc1e-c4ec91938b8f

Conversation

@wiiiimm
Copy link
Copy Markdown
Owner

@wiiiimm wiiiimm commented Sep 6, 2025

Summary

This PR enables sponsorship support for gh-manager-cli through Buy Me a Coffee, with preparation for future GitHub Sponsors integration.

Changes

  • 🎯 Enabled Buy Me a Coffee link in .github/FUNDING.yml
  • 📝 Added comprehensive sponsorship platform documentation
  • 🔄 Commented out GitHub Sponsors (pending approval)
  • ✅ Added tests for sponsorship functionality

Why Buy Me a Coffee First?

  • Immediate availability (no approval needed)
  • Simple one-time donations
  • Lower friction for supporters
  • GitHub Sponsors can be added once approved

What This Enables

Once merged, the repository will show a "Sponsor" button that links to the Buy Me a Coffee page (https://buymeacoffee.com/wiiiimm), allowing users to support the project development.

Next Steps

  1. Merge this PR to enable the sponsor button
  2. Monitor sponsorship response
  3. Add GitHub Sponsors once approved
  4. Consider in-app sponsorship prompts in future PR

Testing

  • The FUNDING.yml syntax has been validated
  • The Buy Me a Coffee link is active and working
  • Tests included for sponsorship configuration

Summary by CodeRabbit

  • Documentation
    • Added a "Support & Sponsorship" section with a Buy Me a Coffee donation link and a guide to sponsorship platforms.
    • Introduced a sponsorship guide explaining available platforms, how sponsorship works and why to support the project.
  • Chores
    • Added repository funding configuration with an active custom sponsorship link.
  • Tests
    • Added tests to verify presence and content of sponsorship configuration, documentation and README references.

- Comment out GitHub Sponsors until approved
- Enable Buy Me a Coffee via custom URL
- Add sponsorship documentation
- Prepare for multi-platform support
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 6, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a funding configuration file at .github/FUNDING.yml, adds docs/SPONSORSHIP_PLATFORMS.md, appends a "Support & Sponsorship" section to README.md, and introduces tests/sponsorship.test.ts to validate funding and docs. No production code or public API changes.

Changes

Cohort / File(s) Summary of Changes
Funding configuration
\.github/FUNDING.yml
New funding config file added with an active custom URL (https://buymeacoffee.com/wiiiimm) and multiple commented placeholder entries (github, ko_fi, patreon, open_collective, tidelift, community_bridge, liberapay, issuehunt, otechie, PayPal).
Documentation
README.md, docs/SPONSORSHIP_PLATFORMS.md
README.md updated with a "Support & Sponsorship" section linking to Buy Me a Coffee. New docs/SPONSORSHIP_PLATFORMS.md documents the sponsorship platform (Buy Me a Coffee), configuration via .github/FUNDING.yml, and guidance for sponsors.
Tests
tests/sponsorship.test.ts
New Vitest suite added to assert existence and content of .github/FUNDING.yml, presence of commented platform markers and custom URL, presence and sections of docs/SPONSORSHIP_PLATFORMS.md, and README references to sponsorship content.

Sequence Diagram(s)

(No sequence diagram — changes are documentation/configuration and tests, not control-flow or runtime feature changes.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my whiskers at YAML light,
A tiny link to fund the night,
Docs snug in burrows, tests on watch,
A coffee cheer, a grateful hop—🥕🐇


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e5ea17 and 4081a7e.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • docs/SPONSORSHIP_PLATFORMS.md (1 hunks)
  • tests/sponsorship.test.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/fix-e22ecaff-82b4-4646-bc1e-c4ec91938b8f

Comment @coderabbitai help to get the list of available commands and usage tips.

cursor[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (6)
README.md (1)

523-526: Minor copy consistency: capitalisation

Use consistent “Buy Me a Coffee” casing.

-☕ **[Ko-fi](https://ko-fi.com/wiiiimm)** - Buy me a coffee (one-time donations)
+☕ **[Ko-fi](https://ko-fi.com/wiiiimm)** - Buy Me a Coffee (one-time donations)
.github/FUNDING.yml (1)

24-24: Add newline at EOF to satisfy yamllint

Fixes “no new line character at the end of file”.

-# otechie: your-otechie-username             # Technical consulting platform
+# otechie: your-otechie-username             # Technical consulting platform
+
docs/SPONSORSHIP_PLATFORMS.md (2)

90-100: markdownlint: remove trailing punctuation from headings

Resolves MD026 warnings.

-### For Individual Developers:
+### For Individual Developers
-### For Open Source Projects:
+### For Open Source Projects
-### For Content Creators:
+### For Content Creators

52-56: Minor hyphenation for clarity

Compound adjectives before nouns should be hyphenated.

-- **Type:** Enterprise open source funding
+- **Type:** Enterprise open‑source funding
tests/sponsorship.test.ts (2)

56-71: Optionally validate YAML by parsing instead of string heuristics

Parsing catches structural errors early. Requires dev dependency (e.g. yaml or js-yaml).

-  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:'))
-    );
-    
-    expect(commentedPlatforms.length).toBeGreaterThan(0);
-  });
+  it('should have proper YAML structure', async () => {
+    const content = readFileSync(fundingYmlPath, 'utf8');
+    // Parse to ensure valid YAML (commented entries are fine)
+    const { parse } = await import('yaml');
+    const data = parse(content);
+    expect(data).toBeTypeOf('object');
+    // Ensure active custom BMaC link is present
+    expect(data.custom).toBeTruthy();
+    expect(Array.isArray(data.custom)).toBe(true);
+    expect(data.custom.some((u: string) => u.includes('buymeacoffee.com/wiiiimm'))).toBe(true);
+  });

73-82: Also assert that README notes “coming soon” if Sponsors remain disabled

Keeps tests aligned with stated rollout. Optional; only if you choose to add the note in README.

-    expect(content).toContain('GitHub Sponsors');
+    expect(content).toContain('GitHub Sponsors');
+    // Optionally, if README adds a “coming soon” note:
+    // expect(content).toMatch(/Sponsors.*coming soon/i);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b94345 and 9e5ea17.

📒 Files selected for processing (4)
  • .github/FUNDING.yml (1 hunks)
  • README.md (1 hunks)
  • docs/SPONSORSHIP_PLATFORMS.md (1 hunks)
  • tests/sponsorship.test.ts (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/SPONSORSHIP_PLATFORMS.md

[uncategorized] ~5-~5: A comma may be missing after the conjunctive/linking adverb ‘Currently’.
Context: ...ile for the gh-manager-cli project. ## Currently Enabled Platforms ### GitHub Sponsors ...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~53-~53: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...rm:** tidelift - Type: Enterprise open source funding - Description: Platform foc...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~95-~95: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...Pal** (familiar to most users) ### For Open Source Projects: - GitHub Sponsors (projec...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[uncategorized] ~114-~114: The official name of this software platform is spelled with a capital “H”.
Context: ...he FUNDING.yml file must be located at: .github/FUNDING.yml in your repository root.

(GITHUB)

🪛 markdownlint-cli2 (0.17.2)
docs/SPONSORSHIP_PLATFORMS.md

90-90: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


95-95: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


100-100: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

🪛 YAMLlint (1.37.1)
.github/FUNDING.yml

[error] 24-24: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
README.md (2)

519-530: Align README promises with what the Sponsor button actually shows

Right now only Buy Me a Coffee is active in FUNDING.yml; GitHub Sponsors and Ko‑fi are commented out. Either add a short note “GitHub Sponsors pending approval; Ko‑fi coming soon” or enable them in FUNDING.yml to match the bullets.

Would you like me to generate a patch that adds a short note here and keeps FUNDING.yml as-is?


523-526: Verify external links with redirects and browser checks

Comment thread .github/FUNDING.yml
Comment thread docs/SPONSORSHIP_PLATFORMS.md Outdated
Comment thread tests/sponsorship.test.ts Outdated
- Update README.md to only show Buy Me a Coffee link
- Update tests to check for Buy Me a Coffee configuration
- Simplify SPONSORSHIP_PLATFORMS.md documentation
- Remove vim swap file (.FUNDING.yml.swp)
- Focus on single sponsorship platform for clarity
@wiiiimm wiiiimm merged commit 76ed5dd into main Sep 6, 2025
2 of 3 checks passed
Comment thread tests/sponsorship.test.ts
const lines = content.split('\n');
const commentedPlatforms = lines.filter(line =>
line.trim().startsWith('#') &&
(line.includes('ko_fi:') || line.includes('patreon:') || line.includes('custom:'))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: FUNDING.yml Configuration Error

The should have proper YAML structure test expects an uncommented github: wiiiimm line, but it's commented out in FUNDING.yml. Additionally, the test's filter for commented platforms incorrectly includes custom:, which is an active configuration.

Fix in Cursor Fix in Web

Comment thread tests/sponsorship.test.ts
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)');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Documentation Mismatch and Missing Content

The sponsorship.test.ts documentation test expects specific content in SPONSORSHIP_PLATFORMS.md that doesn't match the file. It looks for 'GitHub Sponsorship Platforms Guide' as the title, but the document uses 'GitHub Sponsorship Configuration Guide'. Additionally, phrases like 'Ko-fi (Buy Me Coffee Alternative)' and 'Custom URLs (Including Buy Me a Coffee)' are missing.

Fix in Cursor Fix in Web

Comment thread tests/sponsorship.test.ts
expect(content).toContain('Ko-fi');
expect(content).toContain('Buy Me a Coffee');
expect(content).toContain('SPONSORSHIP_PLATFORMS.md');
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: README Update Causes Sponsorship Tests to Fail

The sponsorship.test.ts expects the README.md to include 'GitHub Sponsors', 'Ko-fi', and 'SPONSORSHIP_PLATFORMS.md'. The current README.md update only mentions 'Buy Me a Coffee' and 'Support & Sponsorship', leading to test failures.

Fix in Cursor Fix in Web

wiiiimm pushed a commit that referenced this pull request Sep 6, 2025
# [1.33.0](v1.32.0...v1.33.0) (2025-09-06)

### Features

* add Buy Me a Coffee sponsorship support ([#27](#27)) ([76ed5dd](76ed5dd))
@wiiiimm
Copy link
Copy Markdown
Owner Author

wiiiimm commented Sep 6, 2025

🎉 This PR is included in version 1.33.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant