Skip to content

Commit 2e6bd5b

Browse files
maskarbclaude
andauthored
fix: Minimize old Claude review comments errors (#786)
((COUNT++)) returns exit code 1 when COUNT is 0 because post-increment evaluates to the previous value (0 = falsy). With set -e, this kills the step after successfully minimizing the first comment. Use COUNT=$((COUNT + 1)) which always returns exit code 0. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4259578 commit 2e6bd5b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/amber-auto-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ jobs:
7676
if [ -n "$id" ]; then
7777
if gh api graphql -f query='mutation($id: ID!) { minimizeComment(input: {subjectId: $id, classifier: OUTDATED}) { minimizedComment { isMinimized } } }' -f id="$id" 2>&1; then
7878
echo "✓ Minimized $id"
79-
((COUNT++))
79+
COUNT=$((COUNT + 1))
8080
else
8181
echo "✗ Failed to minimize $id" >&2
82-
((ERRORS++))
82+
ERRORS=$((ERRORS + 1))
8383
fi
8484
fi
8585
done <<< "$COMMENT_IDS"

0 commit comments

Comments
 (0)