Closed basscl closed 1 year ago
Can you open an issue with Git Updater
and link it here, because the new GitHub format is main
and not master
.
Here is your answer: https://git-updater.com/knowledge-base/branch-switching/
I understand that Git Updater expecting master as default branch name goes against the new Github default, and I will open an issue over there.
However, the GitHub Plugin URI:
header is optional for WP and is afaik only used by Git Updater, so the only reason to include it is if you want to make your plugin work ok with Git Updater. Otherwise it would be best to just remove the GitHub Plugin URI:
header.
Re branch switching - this is only possible if Git Updater has correctly connected with the plugin, and if a plugin has default branch other than Master, this can only happen if the plugin has the Primary Branch:
header as mentioned in the kb article you linked to. In this case the plugin was installed via the standard WP plugin gui, so Git Updater branch switching is not possible.
Until either Git Updater fixes this or your plugin headers are updated, anyone using both plugins will see a constant error in their dash. We are using the following lines to avoid this on client sites:
if ( class_exists( 'Fragen\Git_Updater\Ignore' ) ) :
new Fragen\Git_Updater\Ignore( 'redis-cache', 'redis-cache/redis-cache.php' );
endif;
I'm glad you found a solution.
It's been 3 years since the GitHub change and it's that plugin's core competency, I'd expect them to fix it.
redis-cache.php
has the following header, presumably so that the plugin can be managed via the Git Updater pluginGitHub Plugin URI: https://github.com/rhubarbgroup/redis-cache
Git Updater by default requests 'master; branch, but since redis-cache uses 'main', not 'master', when Git Updater requests 'master' branch it returns an error, and displays an error message in the WP dashboard. This error can be avoided simply by addingPrimary Branch: main
toredis-cache.php