|
4 | 4 | workflow_dispatch: |
5 | 5 | inputs: |
6 | 6 | importAll: |
7 | | - default: false |
8 | | - required: false |
| 7 | + description: Import ALL TODOs from the checked-out ref (use with care) |
9 | 8 | type: boolean |
10 | | - description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. |
| 9 | + required: false |
| 10 | + default: false |
11 | 11 | push: |
12 | | - branches: |
13 | | - - master |
| 12 | + # Use your default branch. Avoid multiple branches to prevent self-referencing on merges (per action docs). |
| 13 | + branches: [ main ] |
| 14 | + # Optional: run only when source files change, not docs/CI files. |
| 15 | + paths: |
| 16 | + - '**/*.ts' |
| 17 | + - '**/*.tsx' |
| 18 | + - '**/*.js' |
| 19 | + - '**/*.jsx' |
| 20 | + - '**/*.py' |
| 21 | + - '**/*.rs' |
| 22 | + - '**/*.go' |
| 23 | + - '**/*.java' |
| 24 | + - '**/*.cs' |
| 25 | + - '**/*.rb' |
| 26 | + - '**/*.php' |
| 27 | + - '**/*.sh' |
| 28 | + - '!**/*.md' |
| 29 | + - '!.github/**' |
14 | 30 |
|
15 | 31 | permissions: |
| 32 | + contents: read |
16 | 33 | issues: write |
17 | 34 | repository-projects: read |
18 | | - contents: read |
| 35 | + |
| 36 | +concurrency: |
| 37 | + group: todo-issue-${{ github.ref }} |
| 38 | + cancel-in-progress: true |
19 | 39 |
|
20 | 40 | jobs: |
21 | 41 | todos: |
| 42 | + name: Convert TODOs to issues |
22 | 43 | runs-on: ubuntu-latest |
| 44 | + timeout-minutes: 10 |
| 45 | + if: ${{ !github.event.repository.fork }} # don't run on forks |
23 | 46 |
|
24 | 47 | steps: |
25 | | - - uses: actions/checkout@v5 |
| 48 | + # Pin to a release or a commit SHA for supply-chain safety. |
| 49 | + # v5 example (or replace with a specific commit SHA): |
| 50 | + - name: Checkout |
| 51 | + uses: actions/checkout@v5 |
| 52 | + with: |
| 53 | + # If you plan to run "import all" against history, set fetch-depth: 0 |
| 54 | + fetch-depth: 1 |
26 | 55 |
|
27 | 56 | - name: Run Issue Bot |
28 | | - uses: juulsn/todo-issue@main |
29 | | - with: |
30 | | - excludePattern: '^(node_modules/)' |
| 57 | + # Pin to the latest release tag instead of @main |
| 58 | + |
31 | 59 | env: |
32 | | - GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} # Replace with your PAT secret |
| 60 | + # Use the built-in token; no PAT required. |
| 61 | + # Either works; I prefer github.token so you don't need a secret entry. |
| 62 | + GITHUB_TOKEN: ${{ github.token }} |
| 63 | + with: |
| 64 | + # Keep the regex tight; add common big folders/build artifacts to skip. |
| 65 | + excludePattern: >- |
| 66 | + ^( |
| 67 | + node_modules/| |
| 68 | + dist/| |
| 69 | + build/| |
| 70 | + .next/| |
| 71 | + out/| |
| 72 | + coverage/| |
| 73 | + .venv/| |
| 74 | + venv/| |
| 75 | + target/| |
| 76 | + vendor/ |
| 77 | + ) |
| 78 | + # Optional tweaks (uncomment if you want them) |
| 79 | + keywords: '["TODO","FIXME"]' |
| 80 | + label: '["todo"]' |
| 81 | + autoAssign: false |
| 82 | + caseSensitive: false |
| 83 | + |
0 commit comments