Closed JoshMcCullough closed 1 year ago
Gotcha, make sense. I will add it soon
@JoshMcCullough let me know if this implementation works for you: https://github.com/kiegroup/mock-github/pull/73
It will throw an error if the repository and the branch do not exist
Feature request It'd be great if we could have the ability to switch branches e.g.
gh.repo.checkout('myRepo', 'myBranch')
. Maybe this is just useful for me but in my case I need to be able to check if an action did the right thing based on the branch it was working against. E.g. if it is running against the "qa" branch, then it should push package to the QA repo.Currently I can do this by setting up a separate
MockGithub
instance for each branch I need to test. But it'd be a bit more convenient to be able to set up the GH mock once and then switch branches at the start of each test case.