-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Colorize git #1726
Colorize git #1726
Conversation
Also @FredericoGauz, when you update this PR could you please include screenshots as well? |
Sure! |
.github/scripts/verifyActions.sh
Outdated
git diff --exit-code | diff-so-fancy | less --tabs=4 -RFX | ||
|
||
# Runs git diff quietly to get the exit code | ||
declare EXIT_CODE |
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.
Hmmm does the exit-code
from the first git diff
basically get swallowed up by the other piped commands? If so, I would just get rid of the --exit-code
flag in the first git diff
run. I'd be willing to bet that there's a clean way to propagate that exit code through the piped diff-so-fancy
and less
commands though, which would be preferable.
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.
Hi @roryabraham , I was going to reply you and David after finishing here.
I totally agree with you, but after running many tests with many options (like trying to get from this line: git diff --exit-code | diff-so-fancy | less --tabs=4 -RFX) and also (if [[ EXIT_CODE -eq 0 ]]; ) this directly nothing gave the the first exist code of the pipeline. I tried for a few hours with all the things I could think of.
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.
While I understand that an extra variable is not ideal, that was the best I could do.
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.
Okay, I suck at using bash so I'm not sure I have a better suggestion. I'm not super worried about it, but maybe @bondydaa knows how to do this with some bash wizardry?
@FredericoGauz Can you please retest this by:
|
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.
Hi @roryabraham and @bondydaa, sorry for the late reply. I did the changes requested (it was quite clever to save the whole output in a variable!) and also run the tests you required. The link for the failing action is: https://github.com/Expensify/Expensify.cash/pull/1726/checks?check_run_id=2184601524 I hope that this is what is need, but let me know if I can help with anything else! |
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.
Okay, LGTM. All yours @bondydaa
Details
Adds a better way to see differences between action diffs.
Fixed Issues
#1665
Changes
Adds a temporary Library to the GitHub workflow that reflect better the changes in files