File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,18 +59,20 @@ jobs:
5959 run : |
6060 NEED_CLEANUP=false
6161 REASON=""
62- echo "[cleanup-branch] Commit count: ${{ steps.count.outputs.commit_count }} (threshold: ${{ inputs.commit_threshold }})"
63- echo "[cleanup-branch] Days since last commit: ${{ steps.lastdate.outputs.age_days }} (threshold: ${{ inputs.days_stale }})"
64- if [ "${{ steps.count.outputs.commit_count }}" -gt "${{ inputs.commit_threshold }}" ]; then
62+ COMMIT_COUNT="${{ steps.count.outputs.commit_count }}"
63+ DAYS_STALE="${{ steps.lastdate.outputs.age_days }}"
64+ echo "[cleanup-branch] Commit count: $COMMIT_COUNT (threshold: ${{ inputs.commit_threshold }})"
65+ echo "[cleanup-branch] Days since last commit: $DAYS_STALE (threshold: ${{ inputs.days_stale }})"
66+ if [ "$COMMIT_COUNT" -gt "${{ inputs.commit_threshold }}" ]; then
6567 NEED_CLEANUP=true
66- REASON="Commit count (${ { steps.count.outputs.commit_count } } ) exceeds threshold (${ { inputs.commit_threshold } })"
68+ REASON="Commit count ($COMMIT_COUNT ) exceeds threshold (${{ inputs.commit_threshold }})"
6769 fi
68- if [ "${{ steps.lastdate.outputs.age_days }} " -gt "${{ inputs.days_stale }}" ]; then
70+ if [ "$DAYS_STALE " -gt "${{ inputs.days_stale }}" ]; then
6971 NEED_CLEANUP=true
7072 if [ -n "$REASON" ]; then
7173 REASON="$REASON; "
7274 fi
73- REASON+="Branch is stale (${ { steps.lastdate.outputs.age_days } } days > ${ { inputs.days_stale } })"
75+ REASON+="Branch is stale ($DAYS_STALE days > ${{ inputs.days_stale }})"
7476 fi
7577 if [ "$NEED_CLEANUP" = true ]; then
7678 echo "[cleanup-branch] Cleanup needed: true. Reason: $REASON"
You can’t perform that action at this time.
0 commit comments