-
Notifications
You must be signed in to change notification settings - Fork 143
ci: make the whitespace checker more robust #778
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
ci: make the whitespace checker more robust #778
Conversation
In 32c83af (ci: github action - add check for whitespace errors, 2020-09-22), we introduced a GitHub workflow that automatically checks Pull Requests for whitespace problems. However, when affected lines contain one or more double quote characters, this workflow failed to attach the informative comment because the Javascript snippet incorrectly interpreted these quotes instead of using the `git log` output as-is. Let's fix that. While at it, let's `await` the result of the `createComment()` function. Finally, we enclose the log in the comment with ```...``` to avoid having the diff marker be misinterpreted as an enumeration bullet. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
/submit |
Submitted as pull.778.git.1604418931303.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
Thanks for correcting this. Interesting when escaping is done/not done. |
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This branch is now known as |
This patch series was integrated into seen via git@ba574db. |
Indeed. In this instance, it is actually even more interesting to think of the time when things are interpolated. The So by letting the |
This patch series was integrated into seen via git@dc6020c. |
This patch series was integrated into next via git@dc11218. |
This patch series was integrated into seen via git@387a366. |
This patch series was integrated into seen via git@c040efa. |
This patch series was integrated into seen via git@15486b6. |
This patch series was integrated into next via git@15486b6. |
This patch series was integrated into master via git@15486b6. |
Closed via 15486b6. |
I noticed that the checker failed to add a comment in one of my PRs. Turns out that the double-quote characters in the log output made it fail.
One thing we discussed earlier whether the log should be pasted as pre-formatted text or not, and we fell on the side of not pre-formatting it. However, in my tests, this does not look right, and it looks much better pre-formatted (even if we unfortunately lose the direct link to the commit).
Cc: Chris. Webster chris@webstech.net