Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Feb 26, 2025
2 parents 47261fa + 6b31578 commit 9a7a9eb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#### [unreleased]

#### 12.14.0 / 2025-02-26
* make sure proper release asset headers are added even if access token not set
* ensure _short description_ is 150 characters or less

#### 12.13.0 / 2025-02-21
* update caching
* add `versions` to REST endpoint for `{plugins|themes|update}-api`
Expand Down
2 changes: 1 addition & 1 deletion git-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: Git Updater
* Plugin URI: https://git-updater.com
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
* Version: 12.13.0
* Version: 12.14.0
* Author: Andy Fragen
* License: MIT
* Domain Path: /languages
Expand Down
2 changes: 1 addition & 1 deletion src/Git_Updater/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function plugins_api( $result, $action, $response ) {
$response->version = $plugin->remote_version ?: $plugin->local_version;
$response->sections = $plugin->sections;
// phpcs:ignore WordPress.WP.AlternativeFunctions.strip_tags_strip_tags
$response->short_description = substr( strip_tags( trim( $plugin->sections['description'] ) ), 0, 175 ) . '...';
$response->short_description = substr( strip_tags( trim( $plugin->sections['description'] ) ), 0, 147 ) . '...';
$response->requires = $plugin->requires;
$response->requires_php = $plugin->requires_php;
$response->tested = $plugin->tested;
Expand Down
2 changes: 1 addition & 1 deletion src/Git_Updater/REST/REST_API.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public function get_api_data( \WP_REST_Request $request ) {
'requires_plugins' => $repo_data->requires_plugins,
'sections' => $repo_data->sections,
// phpcs:ignore WordPress.WP.AlternativeFunctions.strip_tags_strip_tags
'short_description' => substr( strip_tags( trim( $repo_data->sections['description'] ) ), 0, 175 ) . '...',
'short_description' => substr( strip_tags( trim( $repo_data->sections['description'] ) ), 0, 147 ) . '...',
'primary_branch' => $repo_data->primary_branch,
'branch' => $repo_data->branch,
'download_link' => $download ? $repo_data->download_link : '',
Expand Down
3 changes: 3 additions & 0 deletions src/Git_Updater/Traits/Basic_Auth_Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ final public function add_auth_header( $args, $url ) {
* @param array $credentials Array of repository credential data.
*/
$args = apply_filters( 'gu_get_auth_header', $args, $credentials );

} elseif ( null !== $credentials['type'] ) { // No access token.
$args['headers'][ $credentials['type'] ] = $credentials['slug'];
}
$args['headers'] = $args['headers'] ?? [];

Expand Down

0 comments on commit 9a7a9eb

Please sign in to comment.