splunk / contentctl

Splunk Content Control Tool
Apache License 2.0
93 stars 25 forks source link

test & release_notes assume repo location #306

Open 0xC0FFEEEE opened 1 month ago

0xC0FFEEEE commented 1 month ago

Both of the mentioned features assume that the repository exists in the same directory as the content, which may not be the case.

They both currently appear to be using different modules (pygit2 for test & git for release_notes) so the solution can't quite be a one size fits all approach today.

There should either be a repo_path config option, or both features aligned to use the same module such as pygit2, where something like the following could be used:

repo_path = pygit2.discover_repository(self.config.path)
repo = pygit2.Repository(path=str(repo_path))