-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize the diff text when there's no change #3036
base: master
Are you sure you want to change the base?
Conversation
The PR preview for 3b74f72 is available at theforeman-foreman-documentation-preview-pr-3036.surge.sh The following output files are affected by this PR: |
This suggests it's not working as intended, but the workflow runs after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely idea. Not sure about the implementation, though :)
When testing the implementation appeared to have an issue, so I need to dive into it a bit more. Though perhaps that was in the other repo I was playing with |
triage: @ekohl friendly reminder |
If a PR doens't generate a diff (like this change) then the message shouldn't link to any diffs. By making this message explicit it makes reviewing a bit easier.
I've fixed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -68,8 +68,10 @@ jobs: | |||
- name: Create diff to old base | |||
run: | | |||
diff -Nrwu old/ preview/${{ fromJSON(env.PR_DATA).target_name }}/ | cat > preview/diff.patch | |||
pygmentize -o preview/diff.html -l diff -f html -O full preview/diff.patch | |||
diffstat -l -p2 preview/diff.patch > diff.txt | |||
if [[ -s preview/diff.patch ]] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential performance improvement: only install diffstat python3-pygments
if there is a diff.
If a PR doens't generate a diff (like this change) then the message shouldn't link to any diffs. By making this message explicit it makes reviewing a bit easier.
Please cherry-pick my commits into: