Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Arthur Tazhitdinov 2026-02-01 22:17:07 +03:00 committed by GitHub
parent f75c0c5aee
commit 0c050ab33e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View File

@ -69,12 +69,9 @@ jobs:
set -euo pipefail set -euo pipefail
pio run | tee pio.log pio run | tee pio.log
- name: Capture short SHA
id: short_sha
run: echo "short=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Extract firmware stats - name: Extract firmware stats
id: fw_stats
run: | run: |
set -euo pipefail set -euo pipefail
ram_line="$(grep -E "RAM:\\s" -m1 pio.log || true)" ram_line="$(grep -E "RAM:\\s" -m1 pio.log || true)"

View File

@ -1,4 +1,4 @@
name: PR writes (label + comment) name: PR writer (label + comment)
on: on:
pull_request_target: pull_request_target:
@ -16,6 +16,8 @@ jobs:
# Safe: labeler reads files from the base repo by default in pull_request_target context. # Safe: labeler reads files from the base repo by default in pull_request_target context.
# Do NOT checkout PR head. # Do NOT checkout PR head.
- uses: actions/labeler@v5 - uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yml
comment_firmware: comment_firmware:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -63,7 +65,10 @@ jobs:
const fw = artifacts.find(a => a.name === "firmware-bin"); const fw = artifacts.find(a => a.name === "firmware-bin");
const meta = artifacts.find(a => a.name === "build-meta"); const meta = artifacts.find(a => a.name === "build-meta");
if (!meta) core.setFailed("build-meta artifact not found in CI run artifacts."); if (!meta) {
core.setFailed("build-meta artifact not found in CI run artifacts.");
return;
}
// firmware-bin is nice-to-have for linking; fail if you want. // firmware-bin is nice-to-have for linking; fail if you want.
core.setOutput("fw_id", fw ? String(fw.id) : ""); core.setOutput("fw_id", fw ? String(fw.id) : "");
core.setOutput("meta_id", String(meta.id)); core.setOutput("meta_id", String(meta.id));