Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Throw Error when collectGitInfo fails #105

Closed
ryfloyd opened this issue Dec 19, 2017 · 4 comments · Fixed by #188
Closed

Throw Error when collectGitInfo fails #105

ryfloyd opened this issue Dec 19, 2017 · 4 comments · Fixed by #188

Comments

@ryfloyd
Copy link

ryfloyd commented Dec 19, 2017

I spent far too long to understand why my reports to Coveralls.io was not showing any branch info, commit message, etc. My app is built with Docker, and it was excluding .git folder in my .dockerignore file. This resulted with missing formdata POST to coveralls.io.

Easily fixed by just including .git folder to my Docker container.

@mattn
Copy link
Owner

mattn commented Dec 20, 2017

Do you expect that update README.md?

@ryfloyd
Copy link
Author

ryfloyd commented Sep 5, 2018

Perhaps a warning log if the directory is missing the .git?

@gdm85
Copy link
Collaborator

gdm85 commented Oct 30, 2020

The python tool has the possibility to pass the git information via environment variables; that is also possible for the codecov official tool and in general it is a good practice to not bloat the Docker image with the .git directory.

@mattn I would like to submit a PR to add support for git information via environment variables; I would use these for reference: https://github.com/coveralls-clients/coveralls-python/blob/a5de3ba/coveralls/git.py#L101

After that I can also add a CLI flag -require-git=false which - when set to true - makes the tool fail; this way we can prevent the existing behaviour (an error is printed) but allow more strict behaviours for troubleshooting and integrations.

What do you think?

@gdm85
Copy link
Collaborator

gdm85 commented Nov 3, 2020

Implemented in #188

@gdm85 gdm85 closed this as completed in #188 Nov 4, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants