/todoist-readme

🚧 Updates README with Todoist Stats of a user

Primary LanguageJavaScriptCreative Commons Zero v1.0 UniversalCC0-1.0

🚧 Todoist Tasks

⚡️📌 Update your Todoist Tasks ✅


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>
    • TODOIST_LENGTH = <number of tasks you want to fetch>
  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 Tasks

<!-- TODO-IST:START -->
<!-- TODO-IST:END -->

These lines will be our entry-points for the Todoist tasks list.

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 from here
  • Get your Todoist API Key from your here

Repository Workflow For Non-Premium Users

Please follow the steps below:

  1. Go to your <username>/<username>/actions, hit New workflow, set up a workflow yourself, delete all the default content github made for you.
  2. Copy the following code and paste it to your new workflow you created at step 1:
name: Todoist Readme

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

jobs:
  update-readme:
    name: Update Todoist tasks list
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: rxcod9/todoist-readme@master
        with:
          TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
          TODOIST_LENGTH: ${{ secrets.TODOIST_LENGTH }}
  1. Go to your repo secrets by hitting Settings => Secrets tab in your profile repo. You can also enter the url https://github.com/USERNAME/USERNAME/settings/secrets . Please replace the USERNAME with your own username.
  2. Create a new Secret. Name: TODOIST_API_KEY, Value: Paste the Todoist API Token here. If you don't know what is the token, please go to here to find your API Key there.
  3. Create a new Secret. Name: TODOIST_LENGTH, Value: Paste the number of tasks you want to fetch.
  4. Add a comment to your README.md like this:
# Todoist Tasks

<!-- TODO-IST:START -->
<!-- TODO-IST:END -->
  1. Go to Workflows menu (mentioned in step 1), click Todoist Readme, and click Run workflow.
  2. Go to your profile page. you will be able to see it.

Repository Workflow For Premium Users

Please follow the steps below:

  1. Go to your <username>/<username>/actions, hit New workflow, set up a workflow yourself, delete all the default content github made for you.
  2. Copy the following code and paste it to your new workflow you created at step 1:
name: Todoist Readme

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

jobs:
  update-readme:
    name: Update Todoist tasks list
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: rxcod9/todoist-readme@master
        with:
          TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
          TODOIST_LENGTH: ${{ secrets.TODOIST_LENGTH }}
  1. Remaining Steps will be same as Non-Premium Users.

License

CC0

Inspired by abhisheknaidu/todoist-readme

Inspired by yg/todoist-box

Inspired by gautamkrishnar/blog-post-workflow