buildkite / test-collector-python

Python adapter for Buildkite Test Analytics
https://buildkite.com/test-analytics
MIT License
6 stars 5 forks source link

Cannot supply message from github actions CI #31

Closed petemounce closed 2 weeks ago

petemounce commented 1 month ago

https://github.com/buildkite/test-collector-python/blob/main/src/buildkite_test_collector/collector/run_env.py#L57 hard-codes message=None when the collector detects it's running inside github actions.

It's pretty easy to offer the commit message to the collector; export GITHUB_MESSAGE="$(git log -1 --pretty=%B | head -1)" and that's what I tried - then I triedBUILDKITE_ANALYTICS_MESSAGEandBUILDKITE_MESSAGE` before ending up reading the code :)

Would you welcome a PR that allows the =None parameters to be overridden by env-vars?

Even if I'm forced to use github actions, I'd love to use all the features of test analytics.

jimsynz commented 1 month ago

Hi there. I'd for sure welcome a PR that changes this.

petemounce commented 1 month ago

@jimsynz #32 is ready for your reviewing pleasure :)

(Please let me know what kind of coverage you might like; I kinda figured __get_env was already covered, but am totally open to adding things as you direct)

petemounce commented 1 week ago

@jimsynz thanks for the merge! Do you have an ETA for a release that this will appear in?

jimsynz commented 1 week ago

@gchan any chance you can cut a release?

gchan commented 1 week ago

I've published v0.1.9 of the collector with your update @petemounce. Thanks for your contribution and please let us know if you find any issues with this build!

cc @jimsynz