abatilo / actions-poetry

GitHub Actions for Python projects using poetry
MIT License
423 stars 40 forks source link

feat: Adds working_directory Input to Action #14

Closed MrFlynn closed 4 years ago

MrFlynn commented 4 years ago

This PR contains a change that allows the user of the action to specify a working directory where their project is located. Currently, this action assumes that the pyproject.toml is located in the root of the repository, which isn't always the case.

Other minor changes include changing the entrypoint shell from sh to bash and some shell style fixes (as indicated by shellcheck).

abatilo commented 4 years ago

Hey @MrFlynn!

Thank you so much for this pull request. I'm really glad to have this!

Could we consider implementing this slightly differently? Instead of checking for the variable's existence and it being non-empty, I'd rather have the variable get set with a default value of . and then have it always be used. Then the code path stays a little simpler.

And then also, please add usage of this variable to the README.md and the .github/workflows/ci.yml file, even if the value itself is just the default value.

I just value having the explicit config.

If you could update these, I can merge this shortly after.

MrFlynn commented 4 years ago

@abatilo

I agree with everything you said. I had originally given working_directory a default value, but I figured the null check would be a little more safe, but I'm fine with your suggestion.

I also updated the example in the README and added the input to ci.yml. Let me know if the changes I made track with what you wanted.

github-actions[bot] commented 4 years ago

:tada: This PR is included in version 1.3.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: