Skip to content

Create issues from TODOs #108

Create issues from TODOs

Create issues from TODOs #108

Workflow file for this run

name: Create issues from TODOs
on:
workflow_dispatch:
inputs:
importAll:
description: Import ALL TODOs from the checked-out ref (use with care)
type: boolean
required: false
default: false
push:
# Use your default branch. Avoid multiple branches to prevent self-referencing on merges (per action docs).
branches: [ master ]
# Optional: run only when source files change, not docs/CI files.
paths:
- '**/*.ts'
- '**/*.tsx'
- '**/*.js'
- '**/*.jsx'
- '**/*.py'
- '**/*.rs'
- '**/*.go'
- '**/*.java'
- '**/*.cs'
- '**/*.rb'
- '**/*.php'
- '**/*.sh'
- '!**/*.md'
- '!.github/**'
permissions:
contents: read
issues: write
repository-projects: read
concurrency:
group: todo-issue-${{ github.ref }}
cancel-in-progress: true
jobs:
todos:
name: Convert TODOs to issues
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ !github.event.repository.fork }} # don't run on forks
steps:
# Pin to a release or a commit SHA for supply-chain safety.
# v5 example (or replace with a specific commit SHA):
- name: Checkout
uses: actions/checkout@v5
with:
# If you plan to run "import all" against history, set fetch-depth: 0
fetch-depth: 1
- name: Who am I with this token?
run: |
set -euo pipefail
who=$(curl -s -H "authorization: Bearer ${{ env.GITHUB_TOKEN }}" https://api.github.com/user | jq -r '.login,.type')
echo "Actor via token: $who"
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run Issue Bot
# Pin to the latest release tag instead of @main
uses: juulsn/[email protected]
env:
# Use the built-in token; no PAT required.
# Either works; I prefer github.token so you don't need a secret entry.
GITHUB_TOKEN: ${{ github.token }}
with:
# Keep the regex tight; add common big folders/build artifacts to skip.
excludePattern: >-
^(
node_modules/|
dist/|
build/|
.next/|
out/|
coverage/|
.venv/|
venv/|
target/|
vendor/
)
# Optional tweaks (uncomment if you want them)
keywords: "TODO"
label: "todo"
autoAssign: false
caseSensitive: false