Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Creating Your Own Pinned Gist Bot

Creating Your Own Pinned Gist Bot

How to create your own pinned gist bot - given at the MidlandsJS Meetup.
If you'd like me to give this talk as a talk or a workshop - email me at josh@turboapi.dev


Josh Ghent

January 23, 2021


  1. Creating Your Own Pinned Gist Bot with GitHub Actions Josh

    Ghent https://bit.ly/pinned-gist-leicsjs
  2. What?

  3. Idea! • Find an API ◦ Good Docs ◦ Static

    Token (because OAuth2 is a pain) • Ideally an API you used or data you’re interested in ◦ Fitbit ◦ Pocket ◦ GoodReads ◦ Todoist
  4. Lay the Foundations • Clone https://github.com/joshghent/rescue-box as a framework •

    Create a new repo - github.com/myuser/api-box • Push the framework to the new the new repo • Create a blank gist and add the ID to the secrets as GIST_ID • Create a new Github token with `gist` scope and add it to the repo secrets as GH_TOKEN
  5. Get the Data • Research the API response for the

    data you want • Get your API token! • Update the code to contain the stats you want
  6. ‍ Test Locally

  7. ⚠ Publish the Action • Update the schedule.yml ◦ Secrets

    ◦ Crontab
  8. ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐

    ⭐ Woo! You just made an automated action! https://bit.ly/pinned-gist-leicsjs