Skip to content

Maintenance 9.x#11385

Merged
sensei-hacker merged 2 commits intomasterfrom
maintenance-9.x
Mar 1, 2026
Merged

Maintenance 9.x#11385
sensei-hacker merged 2 commits intomasterfrom
maintenance-9.x

Conversation

@sensei-hacker
Copy link
Member

No description provided.

Multi-line shell string in the NOTES variable had unindented continuation
lines (**..., >...) that were less indented than the YAML block scalar
body, causing a parse error on every run.

Replace with printf + --notes-file to avoid multi-line strings in the
YAML block scalar entirely. Also moves ${{ }} expressions into env vars
rather than inline in the shell script.
…syntax

CI: fix YAML syntax error in pr-test-builds workflow
@sensei-hacker sensei-hacker merged commit 48cf782 into master Mar 1, 2026
43 checks passed
@qodo-code-review
Copy link
Contributor

Review Summary by Qodo

Fix YAML syntax error in pr-test-builds workflow

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Fixes YAML syntax error in pr-test-builds workflow
• Moves GitHub expressions into environment variables
• Replaces multi-line NOTES variable with printf and file
• Improves shell script readability and maintainability
Diagram
flowchart LR
  A["Multi-line NOTES variable<br/>with syntax errors"] -->|Replace with| B["Environment variables<br/>for expressions"]
  B -->|Use printf to| C["release-notes.md file"]
  C -->|Pass to| D["gh release create<br/>--notes-file"]
Loading

Grey Divider

File Changes

1. .github/workflows/pr-test-builds.yml 🐞 Bug fix +14/-15

Refactor YAML syntax and shell variable handling

• Moves ${{ }} expressions into environment variables (PR_NUMBER, SHORT_SHA, HEX_COUNT,
 HEAD_SHA, REPO)
• Replaces inline multi-line NOTES variable with printf command that writes to
 release-notes.md
• Updates gh release create to use --notes-file release-notes.md instead of --notes "${NOTES}"
• Changes glob pattern from *.hex to hexes/*.hex for clarity

.github/workflows/pr-test-builds.yml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Mar 1, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. release-notes.md written to repo 📘 Rule violation ⛯ Reliability
Description
The workflow generates release-notes.md in the repository workspace, which is a source directory,
instead of writing generated artifacts to a build/temp directory. This can violate the requirement
to keep generated/environment-specific outputs out of the repository and avoid modifying tracked
sources during build steps.
Code

.github/workflows/pr-test-builds.yml[R88-98]

+          printf '%s\n\n%s\n\n%s\n' \
+            "Test build for [PR #${PR_NUMBER}](${PR_URL}) — commit \`${SHORT_SHA}\`" \
+            "**${HEX_COUNT} targets built.** Find your board's \`.hex\` file by name (e.g. \`MATEKF405SE.hex\`)." \
+            "> Development build for testing only. Use Full Chip Erase when flashing." \
+            > release-notes.md
+          gh release create "pr-${PR_NUMBER}" hexes/*.hex \
            --repo iNavFlight/pr-test-builds \
            --prerelease \
-            --target "${{ github.event.workflow_run.head_sha }}" \
+            --target "${HEAD_SHA}" \
            --title "PR #${PR_NUMBER} (${SHORT_SHA})" \
-            --notes "${NOTES}"
+            --notes-file release-notes.md
Evidence
PR Compliance ID 4 requires build steps to avoid writing generated outputs into tracked source
directories. The workflow writes a generated release-notes.md file into the workspace and then
uses it as an input to gh release create.

.github/workflows/pr-test-builds.yml[88-98]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The workflow creates a generated file (`release-notes.md`) in the repository workspace. Compliance requires generated/environment-specific artifacts to be kept out of the source tree and to avoid modifying tracked sources during build steps.

## Issue Context
This file is only needed as an input to `gh release create --notes-file` and can be placed in a temporary directory (e.g., `$RUNNER_TEMP`) or avoided entirely by providing notes directly.

## Fix Focus Areas
- .github/workflows/pr-test-builds.yml[88-98]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant