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

abhisheknaiidu

Abhishek Naidu

Posted on September 12, 2020

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!

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
abhisheknaiidu
Abhishek Naidu

Posted on September 12, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About