
This commit simplifies entrypoint.sh for GitHub Actions by removing duplication of args and black_args (cf. #1909). The reason why #1909 uses the input id black_args is to avoid an overlap with args, but this naming seems redundant. So let me suggest option and src, which are consistent with CLI. Backward compatibility is guaranteed; Users can still use black_args as well. Commit history pre-merge: * Simplify GitHub Action entrypoint (#1909) * Fix prettier * Emit a warning message when `black_args` is used This deprecation should be visible in GitHub Action's UI now. Co-authored-by: Shota Ray Imaki <shota.imaki.0801@gmail.com> Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
9 lines
221 B
Bash
Executable File
9 lines
221 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
if [ -n $INPUT_BLACK_ARGS ]; then
|
|
echo '::warning::Input `with.black_args` is deprecated. Use `with.options` and `with.src` instead.'
|
|
black $INPUT_BLACK_ARGS
|
|
exit $?
|
|
|
|
black $INPUT_OPTIONS $INPUT_SRC
|