get_handle(); $domain = $this->get_domain(); $handle = rawurlencode( $handle ); return "https://{$domain}/api/v4/projects/{$handle}/repository/archive.zip?sha={$branch}"; } // disable the custom validation because user may use custom gitlab instance or groups which adds portions like /group/subgroup/ etc.. // protected function validate_repo_url() { // return parent::validate_repo_url();. // check if string has exact format in a URL like this: https://gitlab.com/owner/reponame . // if ( ! preg_match( '/^https?:\/\/[^\/]+(\/[^\/]+)+$/', $this->get_repo_url() ) ) { // return new \WP_Error( 'invalid', __( 'Repository url must be a valid GitLab repository url', 'deployer-for-git' ) ); // } // }. }