File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,13 @@ runs:
112112 exit 0
113113 fi
114114
115+ # Only comment when the tasks file was changed in this PR
116+ if ! gh pr diff "${{ github.event.pull_request.number }}" --name-only \
117+ | grep -qxF "${{ inputs.tasks-file }}"; then
118+ echo "Tasks file not changed in this PR; skipping comment."
119+ exit 0
120+ fi
121+
115122 CREATED=$(python3 -c "import json; print(json.load(open('/tmp/tasksmd-sync-result.json'))['created'])")
116123 UPDATED=$(python3 -c "import json; print(json.load(open('/tmp/tasksmd-sync-result.json'))['updated'])")
117124 ARCHIVED=$(python3 -c "import json; print(json.load(open('/tmp/tasksmd-sync-result.json'))['archived'])")
@@ -128,4 +135,5 @@ runs:
128135
129136 > This is a preview. Changes will be applied when merged to main."
130137
131- gh pr comment "${{ github.event.pull_request.number }}" --body "$BODY"
138+ gh pr comment "${{ github.event.pull_request.number }}" \
139+ --body "$BODY" --edit-last --create-if-none
You can’t perform that action at this time.
0 commit comments