A Gleam program that queries the Github v4 GraphQL API to request the Gleam project's list of contributors and sponsors.
# Build the project
gleam build #OR
gleam run
# Run the eunit tests
gleam test
# Run the program!
gleam run $TOKEN $FROM_VERSION $TO_VERSION
Note that $TO_VERSION is optional, and will default to the current datetime if not given.
This will generate a list of everyone who sponsors you over $10 per month
- Set up your repo to perform github actions (Link required)
- Add your github token to the repo secrets (Link required)
- In the root directory of the file you want to autogenerate, in folder
.github/workflows/
create ayaml
file with the following code
name: Sponsors List
# Controls when the action will run.
# Can set to on: push for example.
# This will run every 15 minutes!
on:
schedule:
- cron: '*/15 * * * *'
jobs:
readme_edit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gleam-lang/setup-erlang@v1.0.0
with:
otp-version: 23.0
- uses: gleam-lang/setup-gleam@v1.0.1
with:
gleam-version: 0.18.0-rc3
- name: Clones gleam_contributors
run: |
git clone https://github.com/scripttease/gleam_contributors.git
cd gleam_contributors
gleam build
gleam test
gleam format --check src test
- name: Adds Sponors to README
run: |
gleam run readme-list $API_TOKEN README.md
# Runs a set of commands using the runners shell
- name: Commits and pushes updated README
run: |
git add README.md
git config user.email scripttease@users.noreply.github.com
git config user.name Al Dee
git commit README.md -m 'Update README.md with test Cron job' || echo "Update README.md failed"
git push origin || echo "Push Failed"
- In the name of the file that you wish to put your sponsors list, add the following code (For example, in the README.md) Then COMMENT OUT THE LINE! The file should be a markdown file.
Below this line this file is autogenerated
- If you wish to instead run the sponsors list generator from the command line use:
gleam run readme-list $FILENAME
readme-list is a tag, it does not need to be in quotes. If you run the command from the root directory containing FILENAME.md, and if it has the commented out line shown above, the sponsor list will be generated as shown below as a series of avatar images.
# To generate sponsor list from command line:
gleam run readme-list $FILENAME
Here's what it looks like in action:
- Arian Daneshvar
- Ben Myles
- Bernardo Amorim
- Bryan Paxton
- Christian Meunier
- Clever Bunny LTD
- Cole Lawrence
- Dave Lucia
- David McKay
- Eric Meadows-Jönsson
- Erik Terpstra
- Florian Kraft
- Guilherme Pasqualino
- Hendrik Richter
- Herdy Handoko
- Ingmar Gagen
- Ivar Vong
- James MacAulay
- Jechol Lee
- John Palgut
- José Valim
- Lars Wikman
- Mario Vellandi
- mario
- Mark Markaryan
- Matthew Cheely
- Michael Jones
- Mike Roach
- Milad
- Nick Reynolds
- Parker Selbert
- Raphael Megzari
- Sean Jensen-Grey
- Shritesh Bhattarai
- Tristan Sloughter
- Wojtek Mach