afragen / git-updater Goto Github PK
View Code? Open in Web Editor NEWThis WP plugin will update GitHub, Bitbucket, GitLab, and Gitea hosted plugins and themes
Home Page: https://git-updater.com
License: MIT License
This WP plugin will update GitHub, Bitbucket, GitLab, and Gitea hosted plugins and themes
Home Page: https://git-updater.com
License: MIT License
Hi Andy,
Sorry i am posting here. As I mentioned previously, I got the updater to work with my theme, WP-Forge. The one thing I noticed is that my repository was named WP-Forge, not wp-forge. So when I updated I had two themes one called WP-Forge and one called wp-forge and there was a constant "update available" notice. So What I did was deleted the old repository and created a new one with all lower case letters. Now the updates work perfectly and everything is named properly. Thanks again for the help I appreciate it.
Hi again @afragen.
My $boss discovered today a bug while updating one of our plugins (it was working until this new 4.4.5 release), where after updating to the latest version, the plugin folder name renamed itself (from abn-admanager to abn).
Al the feedback in the admin area was ok, and also the plugin was activated correctly in my DEV site after updating. Anyway my $boss says in some other sites it was deactivated because no plugin file was found on the correct route (and makes sense).
I can just replicate the folder name bug, no headers changed...
So maybe we're doing something wrong?
I'm giving you access to the repo as always. ;)
Many thanks in advance.
This plugin replaces every file in the theme with the version of the same file in GitHub, and unfortunately that means that wipes out any changes that a person has made to the theme. Would it be possible to define certain files that would be retained when an update is performed? Perhaps via something similar to a .gitignore file?
hi.. i just discovered this plugin thank you!!
just asking: how much time does it take for github to make a new version available?
i'm using the "check again" button.. and also cleared the transient:
update wp_options set option_value='' where option_name='_site_transient_update_plugins';
now it seems to tale at least 15 minutes.. is it normal?
thank you!
PS: i'm using this in a development environment.. so we need the updates to go up faster than in a production one
Would be nice :)
This change was deactivated my plugins and caused broken websites. Why did it changed the name of the folder?
Is it possible to integrate this directly in my custom theme so I could ship my theme with automatic updates built-in? :-)
There's a bug where the API call will look at the default branch (which might not be master
) to find the remote version, but then the download URL is hard-coded to be the master branch.
I'll wait until #6 is committed to ease merging issues, but I already have a fix for this, by way of an improvement where the plugin author can define the branch to check and download from using a GitHub Branch:
plugin header. If they don't add it, then the default branch is used in both situations.
Add a random element to the transient timeout so all transients don't expire at the same time.
I noticed in the documentation that to update themes hosted in private repository you have to place a Github access token with full read permissions or the username and password for your Bitbucket account into a comment in style.css. Is there currently any way within the plugin to remove this sensitive information before delivering style.css to a website visitor?
For reference: http://developer.github.com/v3/oauth/#scopes
The plugin generated 203 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
probably some whitespace after a ?> somewhere
It would be good if we could amend that View version ... details
link to bring up something relevant e.g. CHANGES.md in the relevant branch.
It would also be good if we could populate that Compatibility with WordPress ...
value as well, perhaps reading a particular string in the README.md.
For both, we could fall back to looking for the relevant section in the readme.txt file, if it exists.
Would it be possible to add some advise to developers on how to best debug issues when they use this tool.
I've my plugin hosted here, and have incremented the version from 0.0.3 to 0.0.4
https://github.com/emeraldjava/wp_flickr/blob/master/wp_flickr.php
but i am not seeing any update option on the plugin panel of my 3.7 wordpress instance. I have the latest github-updater installed. any advise would be appreciated.
P
There's a couple of methods that both the updater classes use, so to reduce duplicate code, it would make sense to have a base updater class that the plugin and theme classes both extend.
Bring theme updating on par with plugin updating, in terms of changelog. Add rollback feature. Need to hook into after_theme_row_{stylesheet}
In order to use the PHP Markdown Lib, uses namespaces, PHP >= 5.3 is needed.
Does this present a problem for anyone?
Does this work with non-GitHub hosted repositories (bitbucket, assembla, private repos, etc...)?
I just got the following error message (see below) on /wp-admin/update-core.php admin page when I was about to display this page for performing plugin updates - some of Gravity Forms & Add-Ons, plus some from wordpress.org. Currently there were no plugins from GitHub.com amongst those for update:
Fatal error: Cannot use object of type WP_Error as array in /my/path/to/wp-content/plugins/github-updater/includes/class-plugin-updater.php on line 79
GitHub Updater was in latest version v2.6.1 active.
Thanks, Dave :)
@jazzsequence I think I've finally gotten this figured out. Please test latest develop
branch.
@GaryJones, if we stick with semantic versioning should next tag be 1.6.0 as the short uri is a feature not a bug fix?
The following errors appear when viewing the update details dialog popup in WP 3.9-beta3 and using latest version of GHU:
Notice: Undefined property: stdClass::$sections in /wp-admin/includes/plugin-install.php on line 337
Notice: Undefined property: stdClass::$sections in /wp-admin/includes/plugin-install.php on line 350
Notice: Undefined property: stdClass::$name in /wp-admin/includes/plugin-install.php on line 356
Notice: Undefined property: stdClass::$sections in /wp-admin/includes/plugin-install.php on line 359
Notice: Undefined property: stdClass::$sections in /wp-admin/includes/plugin-install.php on line 412
My readme.txt
is styled according to the proper format as is also used on http://generatewp.com/plugin-readme/. If this is about the plugin header, that is formatted correctly although it's preceded by a general comment block regarding the file itself (like bbPress does):
/**
* The Plugin
*
* @package Plugin
* @subpackage Main
*
* @todo Fix bugs
*/
If additional details need to be provided, let me know.
Now that the project supports GitHub Branch, it should be includes (pointing to master) in this plugin, so that it can move to a git-flow setup in the future. Git-flow basically means making all commits to the develop
branch (and setting it as default within GitHub repo Settings), which leaves master
as a clean version of the last released version, known to be working as intended.
GitHub Branch: master
Existing installs of this plugin will still be hard-coded to be pulling from the master.zip
anyway, and once they've updated once, they'll have the GitHub Branch support that means future version checks will be to the master
branch as well (instead of the default develop
branch).
Hi,
I'm trying to use this plugin to work with my wordpress themes. Though the updates I make on my github files are showing on the wordpress installed themes, I keep getting the update theme notification even when there's nothing to update. And it keeps saying update to version 0.0.0
My style.css header is this
/**
*
* Theme Name: Janival
* Theme URI: http://gabyferman.com
* Description: This site was built using the Bones Development Theme.
* Author: Gaby Ferman
* Version: v1.0.0
* Template Version: 1.0.0
* Github Theme URI: https://github.com/gabyferman/wp-theme-janival
*
*/
I've tried writing Version: 1.0.0 and Template Version: 1.0.0; also tried using just Version and not Template Version, but then the theme wouldn't update.
Do I need to add something else?
This is the link to my theme files: https://github.com/gabyferman/wp-theme-janival
Gitlab is the most widespread open-source alternative to github and it can be self-hosted.
Integrating Gutlab support for both private and open repositories would mean that we'll be able to use our own servers for updates instead of relying to 3rd party services.
Gitlab has a pretty open API http://api.gitlab.org/repositories.html and it tries to emulate the way github works in many ways.
If you install gitlab to use on your own organization you'll see that in many ways it is better and more versatile than github, so it only makes sense to use it for our private repos (hosting gitlab on a VPS is way cheaper than a github premium account).
Hi guys.
My scenario's an updated to latest version parent theme, and a child with an available update.
Both themes say there's a new version while opening details in themes admin page (parent says the new version is the same as installed).
I did updated the child via wp-admin/update-core.php?action=do-theme-upgrade when it did show, but i was unable to do it from the theme update link (it was saying we had last version running).
Also, the plugin didn't upgrade to new version. It downgraded to the nearest version (from 2.0 to 1.9 instead of 2.0.1). Tested in 2 sites right now.
Some help? :)
Will this plugin work when repository is set to private? If not (out of the box), is this possible?
Hello,
Would the authors be open to a screen/setting where end users can add their own personal access token? GitHub often throttles unauthenticated API requests and I do not wish to share my personal access token with the world in my theme. I think a better option is to allow end users to optionally save their own personal token through a screen utilizing the settings API. This doesn't have to be required since GitHub does not block all unauthenticated requests.
If a theme/plugin already has the "GitHub Access Token" specified, I think that should be used instead of this end user token setting. That might come up if a specific credential is needed to access a specific private repository.
If you agree, let me know if you would like me to help. I really appreciate the work you have done here and the plugin is a big help for hosting my theme on GitHub.
Dan Flippo
At one point theme and plugin authors will be able to update translations separately to the code from WordPress.org.
I think the structure is there to do so. I would be interested if github-updater could do it. The way I see it if I update the translations branch then the translations get updated.
http://ottopress.com/2013/language-packs-101-prepwork/
Just an idea.
We already know if a script is a plugin or a theme during the update check so there is no need to specify that in the header. Alternatively, it should be possible for the plugin to define its own header key via a filter, like:
add_filter( 'github_updater_header_keys', 'my_custom_github_header_key' );
function my_custom_github_header_key( $keys ) {
$keys[] = 'GitHub URI';
return $keys;
}
I think I had this working in the past but I am not sure.
I am trying this with my ARVE plugin. I manually set the version very low to trigger the update, the update info dialog then is from the plugin and not the native WordPress. But it not detects the CHANGES.md in my repo and and shows the version 4.5.3 that I have hosted on wp.org even it I have version 4.5.5 tagged here on Github.
I want to use Github for alpha/beta versions but at the same time wp.org for stable versions. So that as soon as the user installs the updater he/she will get the beta versions of my plugin.
Is this possible?
Problem is that most WP developers are used to developing "staging" code in the master branch. Why? Because thats how WP has us do it in the WP.org SVN repo. You do not want the "default" update code to ever pull from the master branch. Bad practice.
When you've got a line such as:
GitHub Plugin URI: https://github.com/GaryJones/my-plugin
...the https://github.com/
bit is basically redundant, since we know it's going to be that already. We should do a check for this string at the start of the value, and add it in if it's missing (though I'm not sure we need the full URI anyway - just the owner and repo name) - that would then allow a shorter URI in the plugin header tags of:
GitHub Plugin URI: GaryJones/my-plugin
I just updated to 1.8 and get the following error twice on my admin:
Warning: Invalid argument supplied for foreach() in /Users/Surbma/Desktop/Dropbox/Sites/premiumwp.dev/wp-content/plugins/github-updater/classes/class-theme-updater.php on line 87
Sorry if this has been asked before, but I couldn't find an answer in the other issues and the line in the repo is really vague:
This plugin is not allowed in the wp.org repo. 😦
I have found use cases (especially in periods of many quick commits) where it is useful to have the version updater since the theme or plugin you are working on doesn't detect a version change that quickly.
Instead of having either the updater appear or the rollback appear, have the rollback appear all the time.
Just noticed with version 2.1.0 of "GitHub Updater" that a search on WordPress.org plugins via "Plugins > Install > Search" brings no results (empty) as long as GitHub Updater plugin is activated.
In Multisite when the plugin is activated under Network Activation, plugin updating works but theme doesn't.
Theme updating requires activation under the specific site.
Hi, what's the correct way to specify a tag?
An example repository has a develop
branch, as well as tags 1.0.2
and 1.0.1
. I want updates to be triggered based on the latest tag. Would it look like any of the following?
GitHub Plugin URI: https://github.com/username/repo
GitHub Branch: 1.0.2
or
GitHub Plugin URI: https://github.com/username/repo
Stable tag: 1.0.2
or will the plugin automatically use the newest tag?
GitHub Plugin URI: https://github.com/username/repo
I installed the latest develop
branch and then attempted to go to my 'Edit Themes' screen, but got the PHP fatal error:
Fatal error: Call to undefined function fb() in .../wp-content/plugins/github-updater-develop/includes/class-theme-updater.php on line 201
I'm stuck. I can't get rid of the default theme update line in the Themes admin page.
remove_action( "after_theme_row_{$theme->repo}", 'wp_theme_update_row' );
2977962#commitcomment-4964694 doesn't seem to work.
Anyone got any ideas?
Theme rollback, the ability to rollback to a previous tagged release, works in WP 3.8+. It doesn't show up in WP < 3.8.
I could use some help in figuring our why or should we not worry about it?
Hey there!
I keep getting these notices while using the development branch:
Notice: Undefined offset: 0 in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 304
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 314
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 327
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 328
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 329
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 330
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 316
Notice: Undefined offset: 0 in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 304
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 314
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 327
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 328
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 329
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 330
Notice: Trying to get property of non-object in /srv/www/wordpress-default/wp-content/plugins/github-updater/includes/class-github-api.php on line 316
I don't have time to debug right now, I try to tackle this later today.
I am getting these in the dashboard:
Notice: Undefined property: stdClass::$url in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 140
Notice: Undefined variable: ref in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 142
Notice: Undefined offset: 0 in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 291
Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 301
Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 314
Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 315
Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 316
Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 317
Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/github-updater/includes/class-github-api.php on line 303
At the moment, the $expiration value is hardcoded to one hour
set_site_transient( md5( $this->{$this->type}->repo . $file ), $remote, HOUR_IN_SECONDS );
but i my case I would like to be able to change and reduce this value so i could have more frequent updates of the plugins i've installed. It would be good to make this value a plugin parameter and provide a setting screen screen which would offer these values.
MINUTE_IN_SECONDS = 60 (seconds)
HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS
DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS
WEEK_IN_SECONDS = 7 * DAY_IN_SECONDS
YEAR_IN_SECONDS = 365 * DAY_IN_SECONDS
The default value for the parameter would remain as HOUR_IN_SECONDS.
In some places it says it supports both plugins and themes, where as in other places it says it only supports themes in the readme file.
I just updated github-updater to 2.7.0.
My installed theme is version 2.4.5.3
and the latest tag is 2.4.6
.
WP is showing You have version 2.4.5.3 installed. Update to 2.4.6.1-beta.
It seems as though it is not recognizing the tag and instead pulling in the master branch's latest commit.
The only header is: GitHub Theme URI: aaemnnosttv/pagelines
Am I missing something? I'm pretty sure it was working properly before.
Is it possible to create a single global site transient that adds the remote json data to an array then retrieve that array back?
This should help to scale and eliminate rate limit errors. Currently api is called for each plugin/theme
You said The only extra character allowed in a URI is -. Let me know if there is a need for others. . I need the dot :D
On my installation I'm guessing it does not when clicking the 'Check Again' button on the update-core.php
page, which reloads the page with the force-check=1
param. Is their another way to fast force updates or should it be working already? Or can the GitHub Timeout plugin header have a value lower than 1?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.