( git: ReturnType<typeof simpleGit>, )
| 19 | export { isUpstreamMissingError }; |
| 20 | |
| 21 | async function hasUpstreamBranch( |
| 22 | git: ReturnType<typeof simpleGit>, |
| 23 | ): Promise<boolean> { |
| 24 | try { |
| 25 | await git.raw(["rev-parse", "--abbrev-ref", "@{upstream}"]); |
| 26 | return true; |
| 27 | } catch { |
| 28 | return false; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | /** Protected branches that should not be force-pushed to */ |
| 33 | const PROTECTED_BRANCHES = ["main", "master", "develop", "production", "staging"]; |
no outgoing calls
no test coverage detected