File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,10 @@ jobs:
111111 - name : Compare outputs
112112 run : |
113113 . 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
115118 - name : Post comment
116119 id : post-comment
117120 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:
7979 required = True ,
8080 help = "Location of output file of the new run." ,
8181 )
82+ compare_parser .add_argument (
83+ "--commit" ,
84+ required = True ,
85+ help = "Commit hash of the PR commit being checked." ,
86+ )
8287
8388 # Storing arguments
8489 self .config = self ._argument_parser .parse_args ()
@@ -256,6 +261,8 @@ def _create_comment(
256261 "🤖 **Effect of this PR on checked open source code:** 🤖\n \n " + comment
257262 )
258263
264+ comment += f"*This comment was generated for commit { self .config .commit } *"
265+
259266 with open (PRIMER_DIRECTORY / "comment.txt" , "w" , encoding = "utf-8" ) as f :
260267 f .write (comment )
261268
You can’t perform that action at this time.
0 commit comments