Skip to content

Commit

Permalink
Make GitHub comment more descriptive and easier to regex match
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Mar 26, 2021
1 parent 1db5328 commit 45b2a96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/dvc-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
# | added | pygmt/tests/baseline/test_image.png |
- name: Put list of images that were added or changed into report
run: |
echo -e "## Summary of changed images\n" > report.md
echo -e "This is an auto-generated report of images that have changed on the DVC remote\n" >> report.md
dvc diff --show-md master HEAD >> report.md
cat report.md
Expand All @@ -42,7 +44,7 @@ jobs:
id: image-diff
run: |
# Get just the filename of the changed image from the report
tail --lines=+3 report.md | cut --delimiter=' ' --fields=7 > diff_files.txt
tail --lines=+5 report.md | cut --delimiter=' ' --fields=7 > diff_files.txt
# Append each image to the markdown report
echo -e "## Image diff(s)\n" >> report.md
Expand All @@ -66,7 +68,7 @@ jobs:
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## Image diff(s)'
body-includes: 'This is an auto-generated report of images that have changed on the DVC remote'

- name: Create comment with image diff report
if: steps.fc.outputs.comment-id == ''
Expand Down

0 comments on commit 45b2a96

Please sign in to comment.