mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-11-24 14:56:40 +00:00
CI: Link warnings to the commit that was actually built
On pull requests, checkout builds the merge of the PR into the base branch (github.sha), not the PR head. Link source lines to that commit so the line numbers match the compiled code, and label it in the report footer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a3176d8344
commit
ee6f7c129b
2 files changed
+5
-4
No files matched your search
@@ -271,7 +271,7 @@ class Report:
|
||||
def footer(self, full):
|
||||
parts = []
|
||||
if self.sha:
|
||||
parts.append(f"Commit {self.sha[:10]}")
|
||||
parts.append(f"Built from commit {self.sha[:10]}")
|
||||
if self.run_url and not full:
|
||||
parts.append(f"[Full report and build logs]({self.run_url})")
|
||||
parts.append("Deduplicated across translation units and builds. "
|
||||
@@ -345,7 +345,7 @@ def main():
|
||||
parser.add_argument("--logs-dir", required=True, help="Directory with one subdirectory per build log")
|
||||
parser.add_argument("--changed-files", help="File with one changed path (relative) per line")
|
||||
parser.add_argument("--repo", help="owner/name, for links to source lines")
|
||||
parser.add_argument("--sha", help="Commit SHA, for links to source lines")
|
||||
parser.add_argument("--sha", help="SHA of the commit that was built, for links to source lines")
|
||||
parser.add_argument("--run-url", help="URL of the workflow run")
|
||||
parser.add_argument("--comment", default="-", help="Output file for the PR comment (default: stdout)")
|
||||
parser.add_argument("--full", help="Output file for the full report (all warnings)")
|
||||
|
||||
Reference in new issue
Block a user