mirror of
https://github.com/msberends/AMR.git
synced 2025-09-08 18:49:39 +02:00
(v3.0.0.9025) fix todo tracker
This commit is contained in:
7
.github/workflows/todo-tracker.yml
vendored
7
.github/workflows/todo-tracker.yml
vendored
@@ -47,19 +47,20 @@ jobs:
|
||||
echo "" >> todo.md
|
||||
echo "_This overview is automatically updated on each push to \`main\`. It provides an automated overview of all mentions of the text \`TODO\`._" >> todo.md
|
||||
echo "" >> todo.md
|
||||
todos=$(grep -rn --include=\*.{R,Rmd,yaml,yml,md,css,js} --exclude=todo-tracker.yml "TODO" . || true)
|
||||
todos=$(grep -rn --include=\*.{R,Rmd,yaml,yml,md,css,js} --exclude={todo-tracker.yml,todo.md} "TODO" . || true)
|
||||
if [ -z "$todos" ]; then
|
||||
echo "✅ No TODOs found." >> todo.md
|
||||
else
|
||||
echo "$todos" | awk -F: '
|
||||
echo "$todos" | awk -F: -v repo="https://github.com/msberends/AMR/blob/main/" '
|
||||
{
|
||||
file = $1
|
||||
gsub("^\\./", "", file) # remove leading ./ if present
|
||||
line = $2
|
||||
text = substr($0, index($0,$3))
|
||||
if (file != last_file) {
|
||||
if (last_file != "") print "```"
|
||||
print ""
|
||||
print "### " file
|
||||
print "### [`" file "`](" repo file ")"
|
||||
print "```r"
|
||||
last_file = file
|
||||
}
|
||||
|
Reference in New Issue
Block a user