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

feat: Adds working_directory Input to Action #14

Merged
merged 6 commits into from
Jan 1, 2020

Conversation

MrFlynn
Copy link
Contributor

@MrFlynn MrFlynn commented Dec 31, 2019

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).

This allows the user to set the directory in which poetry commands are
run in. This enabled compatibility for projects with no pyproject.toml
in root of the repository.
@MrFlynn MrFlynn changed the title Adds working_directory Input to Action feat: Adds working_directory Input to Action Dec 31, 2019
@abatilo
Copy link
Owner

abatilo commented Dec 31, 2019

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.

Removed check for INPUT_WORKING_DIRECTORY having a non-null value before
changing directory. Default behavior will be to cd into current
directory.
Added variable to ci.yml for completeness purposes.
@MrFlynn
Copy link
Contributor Author

MrFlynn commented Jan 1, 2020

@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.

@abatilo abatilo merged commit f2af45b into abatilo:master Jan 1, 2020
@github-actions
Copy link

github-actions bot commented Jan 1, 2020

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants