public function get_repo_api( $git, $repo = false ) {
		$repo_api = null;
		$repo     = $repo ?: new \stdClass();
		switch ( $git ) {
			case 'github':
				$repo_api = new GitHub_API( $repo );
				break;
			case 'bitbucket':
				if ( ! empty( $repo->enterprise ) ) {
					$repo_api = new Bitbucket_Server_API( $repo );
				} else {
					$repo_api = new Bitbucket_API( $repo );
				}
				break;
			case 'gitlab':
				$repo_api = new GitLab_API( $repo );
				break;
			case 'gitea':
				$repo_api = new Gitea_API( $repo );
				break;
		}

		return $repo_api;
	}