Skip to content

Commit 24c48c6

Browse files
committed
[CI] checkout fork in specific directory
1 parent 522aef9 commit 24c48c6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/comment.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ jobs:
2727
files: |
2828
submissions/*.json
2929
30+
- uses: actions/checkout@v3
31+
with:
32+
ref: ${{github.event.pull_request.head.ref}}
33+
repository: ${{github.event.pull_request.head.repo.full_name}}
34+
path: "fork"
35+
3036
- name: Show changed files
3137
run: |
32-
poetry run smtcomp show --into-comment-file comment.md ${{ steps.changed-files.outputs.all_changed_files }}
38+
poetry run smtcomp show --into-comment-file comment.md --prefix fork/ ${{ steps.changed-files.outputs.all_changed_files }}
3339
3440
- name: PR comment with file
3541
uses: thollander/actions-comment-pull-request@v2

smtcomp/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@
3434
@app.command()
3535
def show(
3636
files: list[Path] = typer.Argument(None),
37+
prefix: Optional[Path] = None,
3738
into_comment_file: Annotated[Optional[Path], typer.Option(help="Write the summary into the given file")] = None,
3839
) -> None:
3940
"""
4041
Show information about a solver submission
4142
"""
4243

44+
if prefix is not None:
45+
files = list(map(prefix.joinpath, files))
46+
4347
def read_submission(file: Path) -> defs.Submission:
4448
try:
4549
return submission.read(str(file))

0 commit comments

Comments
 (0)