Skip to content

Commit 914f752

Browse files
committed
Fix YAML syntax error in workflow file
Replace JavaScript template literals with string concatenation to avoid YAML parser confusion with template literal interpolation syntax. GitHub Actions YAML parser can misinterpret template literal dollar-brace syntax as expression delimiters.
1 parent 41cfcfb commit 914f752

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

.github/workflows/pg-version-check.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
script: |
5151
// Use the captured output from the previous step
52-
const output = `${{ steps.pg_check.outputs.output }}`;
52+
const output = '${{ steps.pg_check.outputs.output }}';
5353
let issuesContent = '';
5454
5555
try {
@@ -73,29 +73,23 @@ jobs:
7373
issuesContent = '*Unable to extract detailed issues*';
7474
}
7575
76-
const commentBody = `## ⚠️ Parameter Group Version Check
77-
78-
The following parameter groups may need version increments:
79-
80-
${issuesContent}
81-
82-
**Why this matters:**
83-
Modifying PG struct fields without incrementing the version can cause settings corruption when users flash new firmware. The \`pgLoad()\` function validates versions and will use defaults if there's a mismatch, preventing corruption.
84-
85-
**When to increment the version:**
86-
- ✅ Adding/removing fields
87-
- ✅ Changing field types or sizes
88-
- ✅ Reordering fields
89-
- ✅ Adding/removing packing attributes
90-
- ❌ Only changing default values in \`PG_RESET_TEMPLATE\`
91-
- ❌ Only changing comments
92-
93-
**Reference:**
94-
- [Parameter Group Documentation](../docs/development/parameter_groups/)
95-
- Example: [PR #11236](https://github.com/iNavFlight/inav/pull/11236) (field removal requiring version increment)
96-
97-
---
98-
*This is an automated check. False positives are possible. If you believe the version increment is not needed, please explain in a comment.*`;
76+
const commentBody = '## ⚠️ Parameter Group Version Check\n\n' +
77+
'The following parameter groups may need version increments:\n\n' +
78+
issuesContent + '\n\n' +
79+
'**Why this matters:**\n' +
80+
'Modifying PG struct fields without incrementing the version can cause settings corruption when users flash new firmware. The `pgLoad()` function validates versions and will use defaults if there\'s a mismatch, preventing corruption.\n\n' +
81+
'**When to increment the version:**\n' +
82+
'- ✅ Adding/removing fields\n' +
83+
'- ✅ Changing field types or sizes\n' +
84+
'- ✅ Reordering fields\n' +
85+
'- ✅ Adding/removing packing attributes\n' +
86+
'- ❌ Only changing default values in `PG_RESET_TEMPLATE`\n' +
87+
'- ❌ Only changing comments\n\n' +
88+
'**Reference:**\n' +
89+
'- [Parameter Group Documentation](../docs/development/parameter_groups/)\n' +
90+
'- Example: [PR #11236](https://github.com/iNavFlight/inav/pull/11236) (field removal requiring version increment)\n\n' +
91+
'---\n' +
92+
'*This is an automated check. False positives are possible. If you believe the version increment is not needed, please explain in a comment.*';
9993
10094
try {
10195
// Check if we already commented

0 commit comments

Comments
 (0)