mirror of
https://github.com/meshtastic/firmware.git
synced 2026-02-01 06:32:01 +00:00
Compare commits
1 Commits
fix-ota-sc
...
trunk-io/u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5006b822d6 |
41
.github/workflows/models_issue_triage.yml
vendored
41
.github/workflows/models_issue_triage.yml
vendored
@@ -100,12 +100,7 @@ jobs:
|
|||||||
prompt: |
|
prompt: |
|
||||||
Analyze this GitHub issue for completeness and determine if it needs labels.
|
Analyze this GitHub issue for completeness and determine if it needs labels.
|
||||||
|
|
||||||
IMPORTANT: Distinguish between:
|
If this looks like a bug on the device/firmware (crash, reboot, lockup, radio issues, GPS issues, display issues, power/sleep issues), request device logs and explain how to get them:
|
||||||
- Device/firmware bugs (crashes, reboots, lockups, radio/GPS/display/power issues) - these need device logs
|
|
||||||
- Build/release/packaging issues (missing files, CI failures, download problems) - these do NOT need device logs
|
|
||||||
- Documentation or website issues - these do NOT need device logs
|
|
||||||
|
|
||||||
If this is a device/firmware bug, request device logs and explain how to get them:
|
|
||||||
|
|
||||||
Web Flasher logs:
|
Web Flasher logs:
|
||||||
- Go to https://flasher.meshtastic.org
|
- Go to https://flasher.meshtastic.org
|
||||||
@@ -118,18 +113,20 @@ jobs:
|
|||||||
|
|
||||||
Also request key context if missing: device model/variant, firmware version, region, steps to reproduce, expected vs actual.
|
Also request key context if missing: device model/variant, firmware version, region, steps to reproduce, expected vs actual.
|
||||||
|
|
||||||
Respond ONLY with valid JSON (no markdown, no code fences):
|
Respond ONLY with JSON:
|
||||||
{"complete": true, "comment": "", "label": "none"}
|
{
|
||||||
OR
|
"complete": true|false,
|
||||||
{"complete": false, "comment": "Your helpful comment", "label": "needs-logs"}
|
"comment": "Your helpful comment requesting missing info, or empty string if complete",
|
||||||
|
"label": "needs-logs" | "needs-info" | "none"
|
||||||
|
}
|
||||||
|
|
||||||
Use "needs-logs" ONLY if this is a device/firmware bug AND no logs are attached.
|
Use "needs-logs" if this is a device bug AND no logs are attached.
|
||||||
Use "needs-info" if basic info like firmware version or steps to reproduce are missing.
|
Use "needs-info" if basic info like firmware version or steps to reproduce are missing.
|
||||||
Use "none" if the issue is complete, is a feature request, or is a build/CI/packaging issue.
|
Use "none" if the issue is complete or is a feature request.
|
||||||
|
|
||||||
Title: ${{ github.event.issue.title }}
|
Title: ${{ github.event.issue.title }}
|
||||||
Body: ${{ github.event.issue.body }}
|
Body: ${{ github.event.issue.body }}
|
||||||
system-prompt: You are a helpful assistant that triages GitHub issues. Be conservative with labels. Only request device logs for actual device/firmware bugs, not for build/release/CI issues.
|
system-prompt: You are a helpful assistant that triages GitHub issues. Be conservative with labels.
|
||||||
model: openai/gpt-4o-mini
|
model: openai/gpt-4o-mini
|
||||||
|
|
||||||
- name: Process analysis result
|
- name: Process analysis result
|
||||||
@@ -140,12 +137,9 @@ jobs:
|
|||||||
AI_RESPONSE: ${{ steps.analysis.outputs.response }}
|
AI_RESPONSE: ${{ steps.analysis.outputs.response }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
let raw = (process.env.AI_RESPONSE || '').trim();
|
const raw = (process.env.AI_RESPONSE || '').trim();
|
||||||
|
|
||||||
// Strip markdown code fences if present
|
let complete = false;
|
||||||
raw = raw.replace(/^```(?:json)?\s*/i, '').replace(/\s*```$/i, '').trim();
|
|
||||||
|
|
||||||
let complete = true;
|
|
||||||
let comment = '';
|
let comment = '';
|
||||||
let label = 'none';
|
let label = 'none';
|
||||||
|
|
||||||
@@ -155,10 +149,9 @@ jobs:
|
|||||||
comment = (parsed.comment ?? '').toString().trim();
|
comment = (parsed.comment ?? '').toString().trim();
|
||||||
label = (parsed.label ?? 'none').toString().trim().toLowerCase();
|
label = (parsed.label ?? 'none').toString().trim().toLowerCase();
|
||||||
} catch {
|
} catch {
|
||||||
// If JSON parse fails, log warning and don't comment (avoid posting raw JSON)
|
// If JSON parse fails, treat as incomplete with raw response as comment
|
||||||
console.log('Failed to parse AI response as JSON:', raw);
|
complete = false;
|
||||||
complete = true;
|
comment = raw;
|
||||||
comment = '';
|
|
||||||
label = 'none';
|
label = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,9 +159,7 @@ jobs:
|
|||||||
const allowedLabels = new Set(['needs-logs', 'needs-info', 'none']);
|
const allowedLabels = new Set(['needs-logs', 'needs-info', 'none']);
|
||||||
if (!allowedLabels.has(label)) label = 'none';
|
if (!allowedLabels.has(label)) label = 'none';
|
||||||
|
|
||||||
// Only comment if we have a valid parsed comment (not raw JSON)
|
core.setOutput('should_comment', (!complete && comment.length > 0) ? 'true' : 'false');
|
||||||
const shouldComment = !complete && comment.length > 0 && !comment.startsWith('{');
|
|
||||||
core.setOutput('should_comment', shouldComment ? 'true' : 'false');
|
|
||||||
core.setOutput('comment_body', comment);
|
core.setOutput('comment_body', comment);
|
||||||
core.setOutput('label', label);
|
core.setOutput('label', label);
|
||||||
|
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ plugins:
|
|||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.497
|
- checkov@3.2.499
|
||||||
- renovate@42.84.2
|
- renovate@43.0.5
|
||||||
- prettier@3.8.0
|
- prettier@3.8.1
|
||||||
- trufflehog@3.92.5
|
- trufflehog@3.92.5
|
||||||
- yamllint@1.38.0
|
- yamllint@1.38.0
|
||||||
- bandit@1.9.3
|
- bandit@1.9.3
|
||||||
- trivy@0.68.2
|
- trivy@0.68.2
|
||||||
- taplo@0.10.0
|
- taplo@0.10.0
|
||||||
- ruff@0.14.13
|
- ruff@0.14.14
|
||||||
- isort@7.0.0
|
- isort@7.0.0
|
||||||
- markdownlint@0.47.0
|
- markdownlint@0.47.0
|
||||||
- oxipng@10.0.0
|
- oxipng@10.1.0
|
||||||
- svgo@4.0.0
|
- svgo@4.0.0
|
||||||
- actionlint@1.7.10
|
- actionlint@1.7.10
|
||||||
- flake8@7.3.0
|
- flake8@7.3.0
|
||||||
|
|||||||
@@ -156,8 +156,16 @@ IF %BPS_RESET% EQU 1 (
|
|||||||
SET "PROGNAME=!FILENAME:.factory.bin=!"
|
SET "PROGNAME=!FILENAME:.factory.bin=!"
|
||||||
CALL :LOG_MESSAGE DEBUG "Computed PROGNAME: !PROGNAME!"
|
CALL :LOG_MESSAGE DEBUG "Computed PROGNAME: !PROGNAME!"
|
||||||
|
|
||||||
@REM Determine OTA filename based on MCU type (unified OTA format)
|
IF "__!MCU!__" == "__esp32s3__" (
|
||||||
SET "OTA_FILENAME=mt-!MCU!-ota.bin"
|
@REM We are working with ESP32-S3
|
||||||
|
SET "OTA_FILENAME=bleota-s3.bin"
|
||||||
|
) ELSE IF "__!MCU!__" == "__esp32c3__" (
|
||||||
|
@REM We are working with ESP32-C3
|
||||||
|
SET "OTA_FILENAME=bleota-c3.bin"
|
||||||
|
) ELSE (
|
||||||
|
@REM Everything else
|
||||||
|
SET "OTA_FILENAME=bleota.bin"
|
||||||
|
)
|
||||||
CALL :LOG_MESSAGE DEBUG "Set OTA_FILENAME to: !OTA_FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "Set OTA_FILENAME to: !OTA_FILENAME!"
|
||||||
|
|
||||||
@REM Set SPIFFS filename with "littlefs-" prefix.
|
@REM Set SPIFFS filename with "littlefs-" prefix.
|
||||||
|
|||||||
@@ -131,8 +131,14 @@ if [[ -f "$FILENAME" && "$FILENAME" == *.factory.bin ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine OTA filename based on MCU type (unified OTA format)
|
# Determine OTA filename based on MCU type
|
||||||
OTAFILE="mt-${MCU}-ota.bin"
|
if [ "$MCU" == "esp32s3" ]; then
|
||||||
|
OTAFILE=bleota-s3.bin
|
||||||
|
elif [ "$MCU" == "esp32c3" ]; then
|
||||||
|
OTAFILE=bleota-c3.bin
|
||||||
|
else
|
||||||
|
OTAFILE=bleota.bin
|
||||||
|
fi
|
||||||
|
|
||||||
# Set SPIFFS filename with "littlefs-" prefix.
|
# Set SPIFFS filename with "littlefs-" prefix.
|
||||||
SPIFFSFILE="littlefs-${PROGNAME/firmware-/}.bin"
|
SPIFFSFILE="littlefs-${PROGNAME/firmware-/}.bin"
|
||||||
|
|||||||
Reference in New Issue
Block a user