public function get_remote_api_changes( $git, $changes, $request ) {
		$response = isset( $this->response['changes'] ) ? $this->response['changes'] : false;

		// Set $response from local file if no update available.
		if ( ! $response && ! $this->can_update_repo( $this->type ) ) {
			$response = $this->get_local_info( $this->type, $changes );
		}

		if ( ! $response ) {
			self::$method = 'changes';
			$response     = $this->api( $request );
			$response     = $this->decode_response( $git, $response );
		}

		if ( ! $response && ! is_wp_error( $response ) ) {
			$response          = new \stdClass();
			$response->message = 'No changelog found';
		}

		if ( $this->validate_response( $response ) ) {
			return false;
		}

		if ( $response && ! isset( $this->response['changes'] ) ) {
			$parser   = new \Parsedown();
			$response = $parser->text( $response );
			$this->set_repo_cache( 'changes', $response );
		}

		$this->type->sections['changelog'] = $response;

		return true;
	}
public function get_remote_api_changes( $git, $changes, $request ) {
		$response = isset( $this->response['changes'] ) ? $this->response['changes'] : false;

		// Set $response from local file if no update available.
		if ( ! $response && ! $this->can_update_repo( $this->type ) ) {
			$response = $this->get_local_info( $this->type, $changes );
		}

		if ( ! $response ) {
			self::$method = 'changes';
			$response     = $this->api( $request );
			$response     = $this->decode_response( $git, $response );
		}

		if ( ! $response && ! is_wp_error( $response ) ) {
			$response          = new \stdClass();
			$response->message = 'No changelog found';
		}

		if ( $this->validate_response( $response ) ) {
			return false;
		}

		if ( $response && ! isset( $this->response['changes'] ) ) {
			$parser   = new \Parsedown();
			$response = $parser->text( $response );
			$this->set_repo_cache( 'changes', $response );
		}

		$this->type->sections['changelog'] = $response;

		return true;
	}
public function get_remote_api_changes ( $ git , $ changes , $ request ) { $ response = isset ( $ this -> response [ 'changes' ] ) ? $ this -> response [ 'changes' ] : false ; // Set $response from local file if no update available. if ( ! $ response && ! $ this -> can_update_repo ( $ this -> type ) ) { $ response = $ this -> get_local_info ( $ this -> type , $ changes ) ; } if ( ! $ response ) { self :: $ method = 'changes' ; $ response = $ this -> api ( $ request ) ; $ response = $ this -> decode_response ( $ git , $ response ) ; } if ( ! $ response && ! is_wp_error ( $ response ) ) { $ response = new \ stdClass ( ) ; $ response -> message = 'No changelog found' ; } if ( $ this -> validate_response ( $ response ) ) { return false ; } if ( $ response && ! isset ( $ this -> response [ 'changes' ] ) ) { $ parser = new \ Parsedown ( ) ; $ response = $ parser -> text ( $ response ) ; $ this -> set_repo_cache ( 'changes' , $ response ) ; } $ this -> type -> sections [ 'changelog' ] = $ response ; return true ; }
Read the remote CHANGES.md file.

@param string $git github|bitbucket|gitlab|gitea)
@param string $changes Changelog filename.
@param string $request API request.

@return bool
Read the remote CHANGES . md file .