name: Copy assigned issue to Todoist
on:
  issues:
    types:
      - assigned

jobs:
  label_issue:
    runs-on: ubuntu-latest
    steps:
      - env:
          TODOIST_TOKEN: ${{ secrets.TODOIST_TOKEN }}
          TODOIST_LABEL_ID: ${{ secrets.TODOIST_LABEL_ID }}
          TODOIST_PROJECT_ID: ${{ secrets.TODOIST_PROJECT_ID }}
          ISSUE_TITLE: ${{ github.event.issue.title }}
        run: |
          curl "https://api.todoist.com/rest/v1/tasks" -X POST --data '{"content": "'"$ISSUE_TITLE"'", "label_ids": ['$TODOIST_LABEL_ID'], "project_id": '$TODOIST_PROJECT_ID', "due_string": "Today"}' -H "Content-Type: application/json" -H "Authorization: Bearer $TODOIST_TOKEN"
Add action to copy assigned issues to me in Todoist
Add action to copy assigned issues to me in Todoist
