Skip to content
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

fix: github-pr-review path's black_check_output value #57

Merged
merged 4 commits into from Jul 7, 2022

Conversation

tsuyoshicho
Copy link
Contributor

Close #56

In github-pr-review:
regenerate with normal command result.

@tsuyoshicho
Copy link
Contributor Author

ping @haya14busa san, @rickstaa san

@rickstaa
Copy link
Member

rickstaa commented Jul 6, 2022

@tsuyoshicho Sorry for the late reply. I'm very busy with my graduation, so I didn't yet find the time to look at this PR. Maybe @haya14busa or @chadsr have time to look at it.

entrypoint.sh Outdated
# read and drop exit code
black_exit_val2="0"
# shellcheck disable=SC2086,SC2034
black_check_output="$(black --check . ${INPUT_BLACK_ARGS} 2>&1)" ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsuyoshicho I think this can be changed to black_check_output="$(black --check . ${INPUT_BLACK_ARGS} 2>&1)" || true since we don't use the exit code.

entrypoint.sh Outdated
@@ -39,6 +39,14 @@ if [[ "${INPUT_REPORTER}" = 'github-pr-review' ]]; then
-level="${INPUT_LEVEL}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
${INPUT_REVIEWDOG_FLAGS} || reviewdog_exit_val="$?"

# regenerate black_check_output that command same as non-github-pr-review.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the shorter Re-generate black output. Needed because the output of the '--diff' option can not be used to retrieve the files that black would change is enough.

@rickstaa
Copy link
Member

rickstaa commented Jul 6, 2022

@tsuyoshicho I went through your pull request. I think your pull request looks good (see my suggestions above). I created a pull request on your fork with these changes (see tsuyoshicho#1). This pull request also contains extra documentation for the BLACK_CHECK_FILE_PATHS output that was added by @chadsr and filters out the Jupyter warning that is thrown by black when a repository contains a .ipynb file but Jupyter is not installed. I think with these changes we can merge #57. Let me know what you think.

rickstaa and others added 2 commits July 6, 2022 19:31
This commit makes sure that the Jupyter warning that is thrown by black
when Jupyter is not installed and the repo contains `.ipynb` files does
not show in the `BLACK_CHECK_FILE_PATHS` variable. It also adds
documentaiton for the `BLACK_CHECK_FILE_PATHS`.
fix: filter jupyter warning and improve readme
@tsuyoshicho
Copy link
Contributor Author

Thanks your fix PR. Good job!
Request re-review, @rickstaa san

@tsuyoshicho tsuyoshicho requested a review from rickstaa July 6, 2022 23:16
@rickstaa
Copy link
Member

rickstaa commented Jul 7, 2022

LGTM thanks for the contribution!

@rickstaa rickstaa merged commit 1c01a3f into reviewdog:master Jul 7, 2022
@tsuyoshicho tsuyoshicho deleted the fix/prerror branch July 7, 2022 09:49
@tsuyoshicho
Copy link
Contributor Author

@rickstaa
Sorry for late request.

There seems to be no update for "black" for a while, so could you please release it?

@rickstaa
Copy link
Member

rickstaa commented Jul 31, 2022

@tsuyoshicho Oh, I forgot to add the bump:minor label when I merged this. Sorry for that. I just released v3.7.0 to include your feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: When repoter "github-pr-review" error occur
2 participants