You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "_No rendered manifest changes across the test-values scenarios._" >> "$summary"
136
+
{
137
+
echo ""
138
+
echo "### 🎉 No changes detected in any of the tested configurations!"
139
+
} >> "$table"
93
140
fi
94
141
95
-
# Always publish the full diff to the job summary.
96
-
cat "$summary" >> "$GITHUB_STEP_SUMMARY"
97
-
98
-
# Cap the PR comment to stay well under GitHub's 65536-char limit.
99
-
if [ "$(wc -c < "$summary")" -gt 60000 ]
142
+
# Full report (table + detailed diffs) always goes to the job summary.
143
+
cat "$table" >> "$GITHUB_STEP_SUMMARY"
144
+
if [ "$any_changes" -eq 1 ]
100
145
then
101
-
head -c 60000 "$summary" > diff-comment.md
102
146
{
103
147
echo ""
104
-
echo "…diff truncated — see the full render diff in the workflow job summary."
105
-
} >> diff-comment.md
148
+
echo "---"
149
+
echo ""
150
+
cat "$details"
151
+
} >> "$GITHUB_STEP_SUMMARY"
152
+
fi
153
+
154
+
# PR comment: table + inline diffs when it fits, otherwise a slimmed
155
+
# table-only comment linking to the full diffs in the job summary
156
+
# (mirrors the self-hosted chart's behaviour on large diffs).
157
+
{
158
+
cat "$table"
159
+
if [ "$any_changes" -eq 1 ]
160
+
then
161
+
echo ""
162
+
echo "---"
163
+
echo ""
164
+
cat "$details"
165
+
fi
166
+
} > /tmp/comment-full.md
167
+
168
+
if [ "$(wc -c < /tmp/comment-full.md)" -le "$COMMENT_LIMIT" ]
169
+
then
170
+
cp /tmp/comment-full.md diff-comment.md
106
171
else
107
-
cp "$summary" diff-comment.md
172
+
{
173
+
cat "$table"
174
+
echo ""
175
+
echo "---"
176
+
echo ""
177
+
echo "> ℹ️ Per-scenario diffs are omitted from this comment because the full render diff exceeds GitHub's comment size limit. See the complete diffs in the [workflow job summary](${RUN_URL})."
178
+
} > diff-comment.md
108
179
fi
109
180
110
-
- name: Post sticky comment
181
+
# Match the repo's preview-readme.yaml convention: minimize (collapse) any
182
+
# previous render-diff comments as OUTDATED, then post a fresh one. Uses
183
+
# first-party actions/github-script (no third-party comment action).
184
+
# continue-on-error: fork PRs get a read-only token and cannot comment; the
185
+
# full diff is still available in the job summary.
186
+
- name: Minimize outdated diff comments and post the latest
0 commit comments