diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml index 92f5f7bc..f1fa19c7 100644 --- a/.github/workflows/comment.yml +++ b/.github/workflows/comment.yml @@ -27,9 +27,15 @@ jobs: files: | submissions/*.json + - uses: actions/checkout@v3 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + path: "fork" + - name: Show changed files run: | - poetry run smtcomp show --into-comment-file comment.md ${{ steps.changed-files.outputs.all_changed_files }} + poetry run smtcomp show --into-comment-file comment.md --prefix fork/ ${{ steps.changed-files.outputs.all_changed_files }} - name: PR comment with file uses: thollander/actions-comment-pull-request@v2 diff --git a/smtcomp/main.py b/smtcomp/main.py index 7a588d7f..7cccf528 100644 --- a/smtcomp/main.py +++ b/smtcomp/main.py @@ -34,11 +34,15 @@ @app.command() def show( files: list[Path] = typer.Argument(None), + prefix: Optional[Path] = None, into_comment_file: Annotated[Optional[Path], typer.Option(help="Write the summary into the given file")] = None, ) -> None: """ Show information about a solver submission """ + + if prefix is not None: + files = list(map(prefix.joinpath,files)) def read_submission(file: Path) -> defs.Submission: try: