Skip to content

Commit b4adecf

Browse files
committed
ci(ci): add check-todos step
1 parent 19e7a42 commit b4adecf

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ jobs:
2323
- uses: actions/checkout@v3
2424
- uses: moonrepo/setup-rust@v1
2525
- run: cargo test --all
26+
27+
check-todos:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
- name: Check for todos
32+
run: ./scripts/show-todos.sh

scripts/show-todos.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
LINEAR_ISSUE=$(git rev-parse --abbrev-ref HEAD | grep -oP '^cod-(\d+)')
2+
3+
if [ "$LINEAR_ISSUE" = "" ]; then
4+
echo "No Linear Issue found, skipping"
5+
6+
exit 0
7+
fi
8+
9+
echo "Searching todos for $LINEAR_ISSUE"
10+
11+
grep "TODO($LINEAR_ISSUE)" . -Rni --color --exclude-dir=".git"

0 commit comments

Comments
 (0)