Add cloneRepoandCheckState

Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>