Skip to content
Andy Fragen edited this page Sep 24, 2019 · 21 revisions

Usage

Naming Conventions

Folder/Directory slugs and plugin/theme slugs must be identical. Otherwise, updating, branch switching, etc. may not function correctly. GitHub Updater will make every effort to correct improper naming that may result from uploading zip files for installation, though this will only happen during an update, a branch switch, or an install.

By convention, the main plugin file or theme style.css file may not be in a subfolder. It must be in the root of the directory.

No two slugs may be identical. This also means a plugin slug and a theme slug cannot be identical.

Example for naming conventions

As an example, if the repository for plugin you want to install and update with the GitHub Updater is located at https://github.com/user/good-plugin, its directory and file structure should look something like this:

├── good-plugin.php
├── readme.txt
├── README.md
├── CHANGES.md
├── includes
|    ├── ...
|    └── queries.php
├── ...
└── ...

Plugins

There must be a GitHub Plugin URI, Bitbucket Plugin URI, GitLab Plugin URI, or Gitea Plugin URI declaration in the plugin's header.

/**
 * Plugin Name:       GitHub Updater
 * Plugin URI:        https://github.com/afragen/github-updater
 * Description:       A plugin to automatically update GitHub, Bitbucket or GitLab hosted plugins and themes. It also allows for remote installation of plugins or themes into WordPress.
 * Version:           1.0.0
 * Author:            Andy Fragen
 * License:           GNU General Public License v2
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.html
 * Domain Path:       /languages
 * Text Domain:       github-updater
 * GitHub Plugin URI: https://github.com/afragen/github-updater
 * GitHub Languages:  https://github.com/afragen/github-updater-translations
 */

Themes

There must be a GitHub Theme URI, Bitbucket Theme URI, GitLab Theme URI, or Gitea Theme URI declaration in the style.css file. When initially adding a theme, the directory must be identical to the repo name.

/**
 * Theme Name:       Test
 * Theme URI:        http://thefragens.net/
 * Version:          0.1.0
 * Description:      Child theme of TwentyTwelve.
 * Author:           Andy Fragen
 * Template:         twentytwelve
 * Template Version: 1.0.0
 * GitHub Theme URI: https://github.com/afragen/test-child
 */

Bitbucket Support

Instead of the GitHub Plugin URI header you will need to use the Bitbucket Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the Bitbucket Theme URI header.

GitLab Support

Instead of the GitHub Plugin URI header you will need to use the GitLab Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the GitLab Theme URI header.

You must set a GitLab private token or a GitLab personal access token.

  • Go to your GitLab Settings page under the Account tab. From here you can retrieve or reset your GitLab access token.
  • Go to your GitLab Profile Settings page under the Access Tokens tab. From here you can create a personal access token.

Gitea Support

Instead of the GitHub Plugin URI header you will need to use the Gitea Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the Gitea Theme URI header.

You must set a Gitea access token.

  • Go to your Gitea Settings page under the Account tab. From here you can retrieve or reset your GitLab access token.
You can’t perform that action at this time.