mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-19 13:41:03 +00:00
A profile stores each custom G-code setting as one JSON string, so GitHub shows a G-code edit as one long changed line and reviewers cannot see what changed. Add a gcode-diff command to orca_profile_tool.py. For each changed profile file it decodes, on both sides, every *_gcode and multiline string option PrintConfig.cpp defines, the options Tab.cpp edits as code, and any string value that spans several lines. It prints one collapsed unified diff per setting as markdown. Files with the same diff for a setting share one section. Trailing spaces are removed, file names cannot mention GitHub users, and the output is cut to whole sections to fit a GitHub comment. Check profiles runs it between the PR's merge commit and its first parent and adds the result to its artifact, with a line naming the PR commit. Post profile check comment posts it under its own marker. It keeps the comment while the diff is unchanged, edits it in place when only the commit changed, replaces it when the diff changes, and deletes it when the PR no longer changes any G-code. The posting job still runs no PR code. It now posts only when the run checked the head of the PR the artifact names, which covers the validation comment too.