import { Ref } from "shared-github-internals/lib/git" ; import { CommandDirectory , createGitRepo , executeGitCommand , RepoState , } from "shared-github-internals/lib/tests/git" ; const createGitRepoAndRebase = async ( { initialState , ref , } ) : Promise < CommandDirectory > => { const directory = await createGitRepo ( initialState ) ; await executeGitCommand ( { args : [ "rebase" , "--autosquash" , "--interactive" , "master" ] , directory , env : { GIT_EDITOR : ":" , GIT_SEQUENCE_EDITOR : ":" } , ref , } ) ; return directory ; } ; export { createGitRepoAndRebase } ;