Skip to content

Commit e3f807a

Browse files
committed
add label and table in html
1 parent 9163874 commit e3f807a

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/size-quality-gates.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ jobs:
8585
- name: Calculate diffs
8686
run: |
8787
python ddev/src/ddev/cli/size/utils/gha_diff.py --prev-sizes status_compressed_${{ inputs.platform }}_prev.csv --curr-sizes status_compressed_${{ inputs.platform }}_curr.json --output diffs_${{ inputs.platform }}.json > size_diffs_output.txt
88+
echo "Comparing base [\${{ steps.merge_base.outputs.sha::7 }}](https://github.com/\${{ github.repository }}/commit/\${{ steps.merge_base.outputs.sha }}) to head [\${{ github.sha::7 }}](https://github.com/\${{ github.repository }}/commit/\${{ github.sha }})" \
89+
>> $GITHUB_STEP_SUMMARY
8890
cat size_diffs_output.txt >> $GITHUB_STEP_SUMMARY
89-
91+
9092
- name: Upload diffs artifact
9193
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
9294
with:

ddev/src/ddev/cli/size/utils/gha_diff.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ def display_diffs_to_html(diffs, platform, python_version):
134134
text += f"{sign}{convert_to_human_readable_size(diffs['total_diff'])}</summary>\n\n"
135135

136136
if diffs["added"]:
137-
text += "<details><summary>Added</summary>\n"
137+
text += " <details><summary>Added</summary>\n"
138138
text += "<table>\n"
139-
text += "<tr><th>Type</th><th>Name</th><th>Version</th><th>Size</th></tr>\n"
139+
text += "<tr><th>Type</th><th>Name</th><th>Version</th><th>Size Delta</th></tr>\n"
140140
for entry in diffs["added"]:
141141
name = entry.get("Name", "")
142142
version = entry.get("Version", "")
@@ -149,9 +149,9 @@ def display_diffs_to_html(diffs, platform, python_version):
149149
text += "No added dependencies/integrations\n\n"
150150

151151
if diffs["removed"]:
152-
text += "<details><summary>Removed</summary>\n"
152+
text += " <details><summary>Removed</summary>\n"
153153
text += "<table>\n"
154-
text += "<tr><th>Type</th><th>Name</th><th>Version</th><th>Size</th></tr>\n"
154+
text += "<tr><th>Type</th><th>Name</th><th>Version</th><th>Size Delta</th></tr>\n"
155155
for entry in diffs["removed"]:
156156
name = entry.get("Name", "")
157157
version = entry.get("Version", "")
@@ -165,10 +165,10 @@ def display_diffs_to_html(diffs, platform, python_version):
165165
text += "No removed dependencies/integrations\n\n"
166166

167167
if diffs["changed"]:
168-
text += "<details><summary>Changed</summary>\n"
168+
text += " <details><summary>Changed</summary>\n"
169169
text += "<table>\n"
170170
text += "<tr><th>Type</th><th>Name</th><th>Version</th>"
171-
text += "<th>Size Change</th><th>Percentage</th></tr>\n"
171+
text += "<th>Size Delta</th><th>Percentage</th></tr>\n"
172172
for entry in diffs["changed"]:
173173
name = entry.get("Name", "")
174174
version = entry.get("Version", "")

0 commit comments

Comments
 (0)