Skip to content

Commit 4f1dff0

Browse files
committed
Merge branch 'develop'
2 parents 58f62d3 + 7e66c46 commit 4f1dff0

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

CHANGES.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#### [unreleased]
22

3+
#### 12.10.1 / 2025-01-30
4+
* fix issue with release asset
5+
* add guard to `Add-Ons`
6+
* remove `git-updater-federation` from `Add-Ons`
7+
38
#### 12.10.0 / 2025-01-29
49
* refactor `Add_Ons` to use `plugins-api` REST endpoint and standard plugin card
510
* added features by @costdev for AJAXifying
611
* added parsing of `Update URI` and `Requires Plugins` headers
712
* increase requirements to PHP 8+
8-
* added REST endpoint to export data from Additions
9-
* added REST endpoint to export Update API data from Additions
13+
* added REST endpoint to export data from `Additions`
14+
* added REST endpoint to export Update API data from `Additions`
1015
* update Freemius/wordpress-sdk
1116
* change 'API Add-Ons' to 'Add-Ons'
1217

git-updater.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Plugin Name: Git Updater
1313
* Plugin URI: https://git-updater.com
1414
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
15-
* Version: 12.10.0
15+
* Version: 12.10.1
1616
* Author: Andy Fragen
1717
* License: MIT
1818
* Domain Path: /languages

src/Git_Updater/Add_Ons.php

+11-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Add_Ons {
2828
'git-updater-bitbucket',
2929
'git-updater-gitlab',
3030
'git-updater-gitea',
31-
'git-updater-federation',
31+
// 'git-updater-federation',
3232
];
3333

3434
/**
@@ -182,7 +182,7 @@ public function upgrader_source_selection( string $source, string $remote_source
182182
}
183183
}
184184

185-
if ( basename( $source ) === $slug ) {
185+
if ( ! isset( $slug ) || basename( $source ) === $slug ) {
186186
return $source;
187187
}
188188

@@ -235,9 +235,16 @@ public function get_addon_api_results() {
235235
continue;
236236
}
237237

238-
$api_results[ $addon ] = json_decode( wp_remote_retrieve_body( $response ), true );
238+
$response = json_decode( wp_remote_retrieve_body( $response ), true );
239+
if ( isset( $response['error'] ) ) {
240+
continue;
241+
}
242+
243+
$api_results[ $addon ] = $response;
244+
}
245+
if ( count( $api_results ) === count( self::$addons ) ) {
246+
$this->set_repo_cache( 'gu_addon_api_results', $api_results, 'gu_addon_api_results', '+24 hours' );
239247
}
240-
$this->set_repo_cache( 'gu_addon_api_results', $api_results, 'gu_addon_api_results', '+24 hours' );
241248
}
242249

243250
return isset( $api_results['timeout'] ) ? $api_results['gu_addon_api_results'] : $api_results;

src/Git_Updater/Traits/GU_Trait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ final public function parse_extra_headers( $header, $headers, $header_parts ) {
643643
}
644644
}
645645
}
646-
$header['release_asset'] = ! $header['release_asset'] && ! empty( $headers['ReleaseAsset'] ) ? 'true' === $headers['ReleaseAsset'] : $header['release_asset'];
646+
$header['release_asset'] = ! $header['release_asset'] && ! empty( $headers['ReleaseAsset'] ) ? true === (bool) $headers['ReleaseAsset'] : $header['release_asset'];
647647
$header['primary_branch'] = ! $header['primary_branch'] && ! empty( $headers['PrimaryBranch'] ) ? $headers['PrimaryBranch'] : 'master';
648648

649649
return $header;

0 commit comments

Comments
 (0)