Skip to content

Commit d25a41c

Browse files
committed
Properly extract line content and update existing issues
1 parent 022586d commit d25a41c

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/scripts/track_fixmes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for file in $(find bin dist docs tools etc examples lib test tools -type f); do
3333
break
3434
fi
3535
lineNumber=$(echo $fixme | cut -d ":" -f 1)
36-
lineContent=$(echo $fixme | cut -d ":" -f 2)
36+
lineContent=$(awk "NR==$lineNumber" $file)
3737
comment="$comment
3838
- [$file#L$lineNumber](https://github.com/stdlib-js/stdlib/blob/develop/$file#L$lineNumber): $lineContent"
3939
fi

.github/workflows/scripts/track_todos

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ for file in $(find bin dist docs tools etc examples lib test tools -type f); do
2929
for todo in $todos; do
3030
if [ -n "$todo" ]; then
3131
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
32-
if [ $(( ${#comment} + ${#todo} )) -gt 3000 ]; then
32+
if [ $(( ${#comment} + ${#todo} )) -gt 65535 ]; then
3333
break
3434
fi
3535
lineNumber=$(echo $todo | cut -d ":" -f 1)
36-
lineContent=$(echo $todo | cut -d ":" -f 2)
36+
lineContent=$(awk "NR==$lineNumber" $file)
3737
comment="$comment
3838
- [$file#L$lineNumber](https://github.com/stdlib-js/stdlib/blob/develop/$file#L$lineNumber): $lineContent"
3939
fi

.github/workflows/track_todos.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,24 @@ jobs:
6666
run: |
6767
. "$GITHUB_WORKSPACE/.github/workflows/scripts/track_fixmes" > tracking_issue_fixmes.md
6868
69-
# Create issue for TODO comments:
70-
- name: 'Create issue for TODO comments'
69+
# Create or update issue for TODO comments:
70+
- name: 'Create or update issue for TODO comments'
7171
uses: peter-evans/create-issue-from-file@v4
7272
with:
7373
title: 'TODO comments'
7474
content-filepath: ./tracking_issue_todos.md
75+
issue-number: 803
7576
labels: |
7677
report
7778
automated-issue
7879
79-
# Create issue for FIXME comments:
80-
- name: 'Create issue for FIXME comments'
80+
# Create or update issue for FIXME comments:
81+
- name: 'Create or update issue for FIXME comments'
8182
uses: peter-evans/create-issue-from-file@v4
8283
with:
8384
title: 'FIXME comments'
8485
content-filepath: ./tracking_issue_fixmes.md
86+
issue-number: 804
8587
labels: |
8688
report
8789
automated-issue

0 commit comments

Comments
 (0)