[PR Testing] fix wrong pr check fail when refactoring code #4642
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the pr check
PR Testingwrongfully failing when the author commits code-only changes (when the bridge html output has not changed).Example scenario when this happens:
PR Testingcheck succeeds, generates the html preview and pushes it into https://github.com/RSS-Bridge/rss-bridge-testsPR Testingcheck failsPR Testinggenerates the exact same html preview, because the code change was irrelevant the the output. Because the html preview is the same, the git commandgit commit -m "$COMMIT_MESSAGE"fails withnothing to commit, working tree cleanand the check gets marked as failed, even though the PR is actually fineSame happens if you fix a typo in a variable name or any other code-only change.
If you look at the
PR Testingaction runs and filter by failure, around 50% failed because ofnothing to commit, working tree clean, e.g.It gets fixed by this PR by cancelling the
Commit and push generated testsstep withexit 0whengit commitfails.