DEV Community

Cover image for πŸ’Ž ANN: kettle-dev v1, part 1
Peter H. Boling
Peter H. Boling

Posted on • Edited on

πŸ’Ž ANN: kettle-dev v1, part 1

This new gem ships with a ton of features, far too much for one post.

So this will be a series.

Open Collective README updater

  • Script: exe/kettle-readme-backers
  • Purpose: Updates README sections for Open Collective backers (individuals) and sponsors (organizations) by fetching live data from your collective.
  • Tags updated in README.md (first match wins for backers):
    • The default tag prefix is OPENCOLLECTIVE, and it is configurable:
    • ENV: KETTLE_DEV_BACKER_README_OSC_TAG="OPENCOLLECTIVE"
    • YAML (.opencollective.yml): readme-osc-tag: "OPENCOLLECTIVE"
    • The resulting markers become: <!-- <TAG>:START --> … <!-- <TAG>:END -->, <!-- <TAG>-INDIVIDUALS:START --> … <!-- <TAG>-INDIVIDUALS:END -->, and <!-- <TAG>-ORGANIZATIONS:START --> … <!-- <TAG>-ORGANIZATIONS:END -->.
    • ENV overrides YAML.
    • Backers (Individuals): <!-- <TAG>:START --> … <!-- <TAG>:END --> or <!-- <TAG>-INDIVIDUALS:START --> … <!-- <TAG>-INDIVIDUALS:END -->
    • Sponsors (Organizations): <!-- <TAG>-ORGANIZATIONS:START --> … <!-- <TAG>-ORGANIZATIONS:END -->
  • Handle resolution:
    1. OPENCOLLECTIVE_HANDLE environment variable, if set
    2. opencollective.yml in the project root (collective: "kettle-rb" by default in this repo)
  • Usage:
    • exe/kettle-readme-backers
    • OPENCOLLECTIVE_HANDLE=my-collective exe/kettle-readme-backers
  • Behavior:
    • Writes to README.md only if content between the tags would change.
    • If neither the backers nor sponsors tags are present, prints a helpful warning and exits with status 2.
    • When there are no entries, inserts a friendly placeholder: "No backers yet. Be the first!" or "No sponsors yet. Be the first!".
    • When updates are written and the repository is a git work tree, the script stages README.md and commits with a message thanking new backers and subscribers, including mentions for any newly added backers and subscribers (GitHub @handles when their website/profile is a github.com URL; otherwise their name).
    • Customize the commit subject via env var: KETTLE_README_BACKERS_COMMIT_SUBJECT="πŸ’Έ Thanks πŸ™ to our new backers πŸŽ’ and subscribers πŸ“œ".
    • Or via .opencollective.yml: set readme-backers-commit-subject: "πŸ’Έ Thanks πŸ™ to our new backers πŸŽ’ and subscribers πŸ“œ".
    • Precedence: ENV overrides .opencollective.yml; if neither is set, a sensible default is used.
    • Note: When used with the provided .git-hooks, the subject should start with a gitmoji character (see gitmoji).
  • Tip: Run this locally before committing to keep your README current, or schedule it in CI to refresh periodically.

Support & Funding Info

I am a full-time FLOSS maintainer. If you find my work valuable I ask that you become a sponsor. Every dollar helps!

πŸ₯° Support FLOSS work πŸ₯° Get access "Sponsors" channel on Galtzo FLOSS Discord πŸ‘‡οΈ Live Chat on Discord
OpenCollective Backers OpenCollective Sponsors Buy me a coffee Donate at ko-fi.com Donate on PayPal Donate on Polar Sponsor Me on Github Liberapay Goal Progress

Photo (cropped) by Stavan Macwan on Unsplash

Top comments (0)