* check if GitRepo already open and close if * only run RepoAssignment once * refactor context helper for api to open GitRepo