Skip to content

Commit b94a7d9

Browse files
Enhance TODO import workflow configuration
Updated workflow to improve TODOs import options and job configuration.
1 parent 2afa6f2 commit b94a7d9

File tree

1 file changed

+62
-11
lines changed

1 file changed

+62
-11
lines changed

.github/workflows/todo.yml

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,80 @@ on:
44
workflow_dispatch:
55
inputs:
66
importAll:
7-
default: false
8-
required: false
7+
description: Import ALL TODOs from the checked-out ref (use with care)
98
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
1111
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/**'
1430

1531
permissions:
32+
contents: read
1633
issues: write
1734
repository-projects: read
18-
contents: read
35+
36+
concurrency:
37+
group: todo-issue-${{ github.ref }}
38+
cancel-in-progress: true
1939

2040
jobs:
2141
todos:
42+
name: Convert TODOs to issues
2243
runs-on: ubuntu-latest
44+
timeout-minutes: 10
45+
if: ${{ !github.event.repository.fork }} # don't run on forks
2346

2447
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
2655

2756
- 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+
uses: juulsn/[email protected]
3159
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

Comments
 (0)