File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,10 @@ jobs:
111
111
- name : Compare outputs
112
112
run : |
113
113
. venv/bin/activate
114
- python tests/primer/primer_tool.py compare --base-file=output_${{ steps.python.outputs.python-version }}_main.txt --new-file=output_${{ steps.python.outputs.python-version }}_pr.txt
114
+ python tests/primer/primer_tool.py compare \
115
+ --commit=${{ github.event.workflow_run.head_sha }} \
116
+ --base-file=output_${{ steps.python.outputs.python-version }}_main.txt \
117
+ --new-file=output_${{ steps.python.outputs.python-version }}_pr.txt
115
118
- name : Post comment
116
119
id : post-comment
117
120
uses : actions/github-script@v6
Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ def __init__(self, json_path: Path) -> None:
79
79
required = True ,
80
80
help = "Location of output file of the new run." ,
81
81
)
82
+ compare_parser .add_argument (
83
+ "--commit" ,
84
+ required = True ,
85
+ help = "Commit hash of the PR commit being checked." ,
86
+ )
82
87
83
88
# Storing arguments
84
89
self .config = self ._argument_parser .parse_args ()
@@ -256,6 +261,8 @@ def _create_comment(
256
261
"🤖 **Effect of this PR on checked open source code:** 🤖\n \n " + comment
257
262
)
258
263
264
+ comment += f"*This comment was generated for commit { self .config .commit } *"
265
+
259
266
with open (PRIMER_DIRECTORY / "comment.txt" , "w" , encoding = "utf-8" ) as f :
260
267
f .write (comment )
261
268
You can’t perform that action at this time.
0 commit comments