DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Show your latest to-do's and Todoist stats automatically on your GitHub profile readme
Abhishek Naidu
Abhishek Naidu

Posted on

Show your latest to-do's and Todoist stats automatically on your GitHub profile readme

This blog is originally published on: My Blog

I use Todoist and Notion App, a lot for organizing my work and maintaining my Timeline. I actually had this idea of automating and showing todoist stats on my README (as Notion doesn't have it's own API till now), a long back when GitHub launched their Profile README's, but due to some work and busy schedule , I'm not able to work on this, but few days ago, I saw DEV's post regarding GitHub Actions hackathon in collaboration with GITHUB. That's when I thought, It's the best time to work on this automation stuff.

Fast Forward to today: I build this automation in just 3 Days, Published it, and also using it!

GitHub logo abhisheknaiidu / todoist-readme

🚧 Updates README with Todoist Stats of a user

🚧 Todoist Stats

βš‘οΈπŸ“Œ Update your Todoist Stats βœ…


Setup

Prep work

  1. You'll need a Todoist API Token. You can get that from here
    • if you're new to Todoist, then you can refer here.
  2. You need to save the Todoist API Token in the repository secrets. You can find that in the Settings of your Repository. Be sure to save those as the following
    • TODOIST_API_KEY = <your todoist API token>
  3. You need to update the README file(README.md) with 2 comments. You can refer here for updating it.

Update your README

Add a comment to your README.md like this:

# Todoist Stats
<!-- TODO-IST:START -->
<!-- TODO-IST:END -->

These lines will be our entry-points for the todoist stats.

New to Todoist

Todoist gives you the confidence that everything’s organized and accounted for, so you can make progress on the things that are important to you.

  • Create a Todoist account…

Todoist Readme Workflow:

Todoist Readme just needs your TODOIST_API_KEY, and if you're PREMIUM user, we have some features also for you guy's πŸ˜‰

Submission Category: Wacky Wildcards

The Workflow looks this:

Repository Workflow For Non-Premium Users:

  name: Todoist Readme

  on:
    workflow_dispatch:
    schedule:
      # Runs every minute 
      - cron: '* * * * *'

  jobs:
    update-readme:
      name: Update todoist stats
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: abhisheknaiidu/todoist-readme@master
          with:
            TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}

Repository Workflow For Premium Users:

  name: Todoist Readme

  on:
    workflow_dispatch:
    schedule:
      # Runs every minute 
      - cron: '* * * * *'

  jobs:
    update-readme:
      name: Update todoist stats
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: abhisheknaiidu/todoist-readme@master
          with:
            TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
            PREMIUM: true

If you loved the project, do share and 🌟 the Repo!

Top comments (0)

This post blew up on DEV in 2020:

js visualized

πŸš€βš™οΈ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! πŸ₯³

Happy coding!