Changeset 3146858
- Timestamp:
- 09/05/2024 09:17:58 AM (18 months ago)
- Location:
- gitium
- Files:
-
- 18 edited
- 1 copied
-
tags/1.0.7 (copied) (copied from gitium/trunk)
-
tags/1.0.7/functions.php (modified) (1 diff)
-
tags/1.0.7/gitium-webhook.php (modified) (2 diffs)
-
tags/1.0.7/gitium.php (modified) (2 diffs)
-
tags/1.0.7/inc/class-git-wrapper.php (modified) (3 diffs)
-
tags/1.0.7/inc/class-gitium-menu.php (modified) (2 diffs)
-
tags/1.0.7/inc/class-gitium-submenu-configure.php (modified) (4 diffs)
-
tags/1.0.7/inc/class-gitium-submenu-settings.php (modified) (3 diffs)
-
tags/1.0.7/inc/class-gitium-submenu-status.php (modified) (2 diffs)
-
tags/1.0.7/readme.txt (modified) (3 diffs)
-
trunk/functions.php (modified) (1 diff)
-
trunk/gitium-webhook.php (modified) (2 diffs)
-
trunk/gitium.php (modified) (2 diffs)
-
trunk/inc/class-git-wrapper.php (modified) (3 diffs)
-
trunk/inc/class-gitium-menu.php (modified) (2 diffs)
-
trunk/inc/class-gitium-submenu-configure.php (modified) (4 diffs)
-
trunk/inc/class-gitium-submenu-settings.php (modified) (3 diffs)
-
trunk/inc/class-gitium-submenu-status.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gitium/tags/1.0.7/functions.php
r2923946 r3146858 194 194 195 195 foreach ( $commit_groups as $base_path => $change ) { 196 $commit_message = _gitium_format_message( $change['name'], $change['version'], " ${change['action']} ${change['type']}" );196 $commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" ); 197 197 $commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false ); 198 198 if ( $commit ) { -
gitium/tags/1.0.7/gitium-webhook.php
r1909349 r3146858 19 19 define( 'SHORTINIT', true ); 20 20 //$wordpress_loader = $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php'; 21 $wordpress_loader = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT', FILTER_SANITIZE_ STRING) . '/wp-load.php';21 $wordpress_loader = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT', FILTER_SANITIZE_FULL_SPECIAL_CHARS) . '/wp-load.php'; 22 22 23 23 require_once $wordpress_loader; … … 26 26 27 27 $webhook_key = get_option( 'gitium_webhook_key', '' ); 28 $get_key = filter_input(INPUT_GET, 'key', FILTER_SANITIZE_ STRING);28 $get_key = filter_input(INPUT_GET, 'key', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 29 29 if ( ! empty ( $webhook_key ) && isset( $get_key ) && $webhook_key == $get_key ) : 30 30 ( '1.7' <= substr( $git->get_version(), 0, 3 ) ) or wp_die( 'Gitium plugin require minimum `git version 1.7`!' ); -
gitium/tags/1.0.7/gitium.php
r2996937 r3146858 2 2 /** 3 3 * Plugin Name: Gitium 4 * Version: 1.0. 64 * Version: 1.0.7 5 5 * Author: Presslabs 6 6 * Author URI: https://www.presslabs.com … … 10 10 * Domain Path: /languages/ 11 11 */ 12 /* Copyright 2014-20 16 Presslabs SRL<[email protected]>12 /* Copyright 2014-2024 Presslabs <[email protected]> 13 13 14 14 This program is free software; you can redistribute it and/or modify -
gitium/tags/1.0.7/inc/class-git-wrapper.php
r2996931 r3146858 16 16 */ 17 17 18 define('GITIGNORE', <<<EOF 18 if (!defined('GITIGNORE')) 19 define('GITIGNORE', <<<EOF 19 20 *.log 20 21 *.swp … … 135 136 136 137 private function get_env() { 137 $env = array(); 138 $env = array( 139 'HOME' => getenv( 'HOME' ), 140 ); 138 141 $key_file = null; 139 142 … … 163 166 164 167 $git_bin_path = apply_filters( 'gitium_git_bin_path', '' ); 165 $cmd = " ${git_bin_path}git $args 2>&1";168 $cmd = "{$git_bin_path}git $args 2>&1"; 166 169 167 170 $proc = proc_open( -
gitium/tags/1.0.7/inc/class-gitium-menu.php
r2923946 r3146858 60 60 61 61 public function disconnect_repository() { 62 $gitium_disconnect_repo = filter_input(INPUT_POST, 'GitiumSubmitDisconnectRepository', FILTER_SANITIZE_ STRING);62 $gitium_disconnect_repo = filter_input(INPUT_POST, 'GitiumSubmitDisconnectRepository', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 63 63 64 64 if ( ! isset( $gitium_disconnect_repo ) ) { … … 74 74 75 75 public function show_message() { 76 $get_message = filter_input(INPUT_GET, 'message', FILTER_SANITIZE_ STRING);77 $get_success = filter_input(INPUT_GET, 'success', FILTER_SANITIZE_ STRING);76 $get_message = filter_input(INPUT_GET, 'message', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 77 $get_success = filter_input(INPUT_GET, 'success', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 78 78 if ( isset( $get_message ) && $get_message ) { 79 79 $type = ( isset( $get_success ) && $get_success == 1 ) ? 'updated' : 'error'; -
gitium/tags/1.0.7/inc/class-gitium-submenu-configure.php
r1909349 r3146858 53 53 54 54 public function regenerate_keypair() { 55 $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_ STRING);55 $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 56 56 if ( ! isset( $submit_keypair ) ) { 57 57 return; … … 63 63 64 64 public function gitium_warning() { 65 $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_ STRING);65 $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 66 66 if ( ! isset( $submit_warning ) ) { 67 67 return; … … 89 89 90 90 public function init_repo() { 91 $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_ STRING);92 $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_ STRING);91 $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 92 $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 93 93 if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) { 94 94 return; … … 108 108 109 109 public function choose_branch() { 110 $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_ STRING);111 $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_ STRING);110 $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 111 $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 112 112 if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) { 113 113 return; -
gitium/tags/1.0.7/inc/class-gitium-submenu-settings.php
r1680884 r3146858 39 39 40 40 public function regenerate_webhook() { 41 $gitium_regen_webhook = filter_input(INPUT_POST, 'GitiumSubmitRegenerateWebhook', FILTER_SANITIZE_ STRING);41 $gitium_regen_webhook = filter_input(INPUT_POST, 'GitiumSubmitRegenerateWebhook', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 42 42 if ( ! isset( $gitium_regen_webhook ) ) { 43 43 return; … … 49 49 50 50 public function regenerate_public_key() { 51 $submit_regenerate_pub_key = filter_input(INPUT_POST, 'GitiumSubmitRegeneratePublicKey', FILTER_SANITIZE_ STRING);51 $submit_regenerate_pub_key = filter_input(INPUT_POST, 'GitiumSubmitRegeneratePublicKey', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 52 52 if ( ! isset( $submit_regenerate_pub_key ) ) { 53 53 return; … … 100 100 101 101 public function save() { 102 $submit_save = filter_input(INPUT_POST, 'GitiumSubmitSave', FILTER_SANITIZE_ STRING);103 $gitignore_content = filter_input(INPUT_POST, 'gitignore_content', FILTER_SANITIZE_ STRING);102 $submit_save = filter_input(INPUT_POST, 'GitiumSubmitSave', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 103 $gitignore_content = filter_input(INPUT_POST, 'gitignore_content', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 104 104 if ( ! isset( $submit_save ) || ! isset( $gitignore_content ) ) { 105 105 return; -
gitium/tags/1.0.7/inc/class-gitium-submenu-status.php
r1680884 r3146858 78 78 79 79 public function save_ignorelist() { 80 $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_ STRING);80 $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 81 81 if ( ! isset( $gitium_ignore_path ) ) { 82 82 return; … … 95 95 96 96 public function save_changes() { 97 $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_ STRING);98 $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_ STRING);97 $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 98 $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 99 99 if ( ! isset( $gitium_save_changes ) ) { 100 100 return; -
gitium/tags/1.0.7/readme.txt
r2996937 r3146858 5 5 Tags: git, version, versioning, deployment, version-control, github, bitbucket, travis, code, revision, testing, development, branch, production, staging, debug, plugin, gitium, presslabs, simple 6 6 Requires at least: 4.7 7 Tested up to: 6. 2.27 Tested up to: 6.6 8 8 Requires PHP: 5.6 9 9 License: GPLv2 10 Stable tag: 1.0. 610 Stable tag: 1.0.7 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 12 … … 55 55 56 56 = Manual Installation = 57 1. Upload `gitium.zip` to the `/wp-content/plugins/` directory; 58 2. Extract the `gitium.zip` archive into the `/wp-content/plugins/` directory; 59 3. Activate the plugin through the 'Plugins' menu in WordPress. 60 61 Alternatively, go into your WordPress dashboard and click on Plugins -> Add Plugin and search for `Gitium`. Then, click on Install and, after that, on Activate Now. 62 57 58 1. Go to your WordPress admin dashboard. 59 2. Navigate to 'Plugins' → 'Add New'. 60 3. Search for "Gitium". 61 4. Install and activate the Gitium plugin. 63 62 64 63 = Usage = 65 64 66 Activate the plugin and follow the on-screen instructions under the `Gitium` menu. 67 68 _IMPORTANT_: Gitium does its best not to version your WordPress core, neither your `/wp-content/uploads` folder. 65 - Connect Your Repository 66 After activation, go to the Gitium settings in your WordPress admin area. 67 Copy the Public Key that Gitium has generated for you from the Key Pair field. 68 In your repository manager of choice (GitHub, GitLab, or Bitbucket), go to the settings page and find the “Deploy keys” (or similar) section. There you will need to add the Public Key you’ve copied from Gitium. This will grant Gitium access to your repository. Make sure to allow write access as well. Also make sure that you copy the entire key from gitium. 69 Now go back to your main repository page and copy the SSH URL to your repo. Paste this URL in Gitium and press the “Fetch” button. 70 A “Repository initialized successfully” message will show up. This means that your repository has been populated with the current code of your website and it is ready to start working with Gitium. 71 72 - Initial Commit 73 Once connected, Gitium will automatically commit your existing WordPress theme and plugins to the connected repository. 74 This initial commit serves as the baseline for your site’s code. 75 76 - Making Changes 77 Make changes to your WordPress site’s code (themes, plugins) as needed. 78 Gitium will automatically commit these changes to your Git repository. 79 Using the webhook provided by Gitium, it will also automatically deploy the changes from the repository to your WordPress site. 80 81 - Webook Configuration 82 Gitium uses the webhook to automatically deploy remote changes to your server. To configure it follow these steps: 83 1. Go to your WordPress website and go to your Gitium Settings page; 84 2. Copy the full Webhook URL that Gitium provides; 85 3. In your Git Manager settings, go to Webhook section, add a new webhook and paste the webhook URL you have copied from Gitium. 86 4. Press Add, no settings changes needed. The webook simply needs a ping, nothing more. The security key is already embedded in the final URL Gitium has generated for you. 87 88 Now when you push to your repo, this webhook will automatically pull the changes to your remote server and deploy them. 89 90 You can see more details about the plugin also in our documentation here: https://www.presslabs.com/docs/code/gitium/install-gitium/ 69 91 70 92 == Frequently Asked Questions == … … 96 118 Submodules are currently not supported. 97 119 120 = Where do I report security bugs found in this plugin? = 121 122 Please report security bugs found in the source code of the Gitium plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/gitium). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 123 98 124 == Upgrade Notice == 99 = 1.0. 5=100 Fixed wrong redirection for multisite installations during initial setup 125 = 1.0.7 = 126 PHP8.1 compatibility, check if gitignore is already defined and add HOME env 101 127 102 128 == Changelog == 129 130 = 1.0.7 = 131 * Fix: HOME env definition; 132 * Fix: deprecation warnings in PHP 8.1; 133 * Compat: added composer.json package; 134 * Compat: add the possibility to use a custom `.gitignore` by defining the `GITIGNORE` constant. 103 135 104 136 = 1.0.6 = -
gitium/trunk/functions.php
r2923946 r3146858 194 194 195 195 foreach ( $commit_groups as $base_path => $change ) { 196 $commit_message = _gitium_format_message( $change['name'], $change['version'], " ${change['action']} ${change['type']}" );196 $commit_message = _gitium_format_message( $change['name'], $change['version'], "{$change['action']} {$change['type']}" ); 197 197 $commit = _gitium_commit_changes( "$commit_message $msg_append", $base_path, false ); 198 198 if ( $commit ) { -
gitium/trunk/gitium-webhook.php
r1909349 r3146858 19 19 define( 'SHORTINIT', true ); 20 20 //$wordpress_loader = $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php'; 21 $wordpress_loader = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT', FILTER_SANITIZE_ STRING) . '/wp-load.php';21 $wordpress_loader = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT', FILTER_SANITIZE_FULL_SPECIAL_CHARS) . '/wp-load.php'; 22 22 23 23 require_once $wordpress_loader; … … 26 26 27 27 $webhook_key = get_option( 'gitium_webhook_key', '' ); 28 $get_key = filter_input(INPUT_GET, 'key', FILTER_SANITIZE_ STRING);28 $get_key = filter_input(INPUT_GET, 'key', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 29 29 if ( ! empty ( $webhook_key ) && isset( $get_key ) && $webhook_key == $get_key ) : 30 30 ( '1.7' <= substr( $git->get_version(), 0, 3 ) ) or wp_die( 'Gitium plugin require minimum `git version 1.7`!' ); -
gitium/trunk/gitium.php
r2996937 r3146858 2 2 /** 3 3 * Plugin Name: Gitium 4 * Version: 1.0. 64 * Version: 1.0.7 5 5 * Author: Presslabs 6 6 * Author URI: https://www.presslabs.com … … 10 10 * Domain Path: /languages/ 11 11 */ 12 /* Copyright 2014-20 16 Presslabs SRL<[email protected]>12 /* Copyright 2014-2024 Presslabs <[email protected]> 13 13 14 14 This program is free software; you can redistribute it and/or modify -
gitium/trunk/inc/class-git-wrapper.php
r2996931 r3146858 16 16 */ 17 17 18 define('GITIGNORE', <<<EOF 18 if (!defined('GITIGNORE')) 19 define('GITIGNORE', <<<EOF 19 20 *.log 20 21 *.swp … … 135 136 136 137 private function get_env() { 137 $env = array(); 138 $env = array( 139 'HOME' => getenv( 'HOME' ), 140 ); 138 141 $key_file = null; 139 142 … … 163 166 164 167 $git_bin_path = apply_filters( 'gitium_git_bin_path', '' ); 165 $cmd = " ${git_bin_path}git $args 2>&1";168 $cmd = "{$git_bin_path}git $args 2>&1"; 166 169 167 170 $proc = proc_open( -
gitium/trunk/inc/class-gitium-menu.php
r2923946 r3146858 60 60 61 61 public function disconnect_repository() { 62 $gitium_disconnect_repo = filter_input(INPUT_POST, 'GitiumSubmitDisconnectRepository', FILTER_SANITIZE_ STRING);62 $gitium_disconnect_repo = filter_input(INPUT_POST, 'GitiumSubmitDisconnectRepository', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 63 63 64 64 if ( ! isset( $gitium_disconnect_repo ) ) { … … 74 74 75 75 public function show_message() { 76 $get_message = filter_input(INPUT_GET, 'message', FILTER_SANITIZE_ STRING);77 $get_success = filter_input(INPUT_GET, 'success', FILTER_SANITIZE_ STRING);76 $get_message = filter_input(INPUT_GET, 'message', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 77 $get_success = filter_input(INPUT_GET, 'success', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 78 78 if ( isset( $get_message ) && $get_message ) { 79 79 $type = ( isset( $get_success ) && $get_success == 1 ) ? 'updated' : 'error'; -
gitium/trunk/inc/class-gitium-submenu-configure.php
r1909349 r3146858 53 53 54 54 public function regenerate_keypair() { 55 $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_ STRING);55 $submit_keypair = filter_input(INPUT_POST, 'GitiumSubmitRegenerateKeypair', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 56 56 if ( ! isset( $submit_keypair ) ) { 57 57 return; … … 63 63 64 64 public function gitium_warning() { 65 $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_ STRING);65 $submit_warning = filter_input(INPUT_POST, 'GitiumSubmitWarning', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 66 66 if ( ! isset( $submit_warning ) ) { 67 67 return; … … 89 89 90 90 public function init_repo() { 91 $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_ STRING);92 $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_ STRING);91 $remote_url = filter_input(INPUT_POST, 'remote_url', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 92 $gitium_submit_fetch = filter_input(INPUT_POST, 'GitiumSubmitFetch', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 93 93 if ( ! isset( $gitium_submit_fetch ) || ! isset( $remote_url ) ) { 94 94 return; … … 108 108 109 109 public function choose_branch() { 110 $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_ STRING);111 $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_ STRING);110 $gitium_submit_merge_push = filter_input(INPUT_POST, 'GitiumSubmitMergeAndPush', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 111 $tracking_branch = filter_input(INPUT_POST, 'tracking_branch', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 112 112 if ( ! isset( $gitium_submit_merge_push ) || ! isset( $tracking_branch ) ) { 113 113 return; -
gitium/trunk/inc/class-gitium-submenu-settings.php
r1680884 r3146858 39 39 40 40 public function regenerate_webhook() { 41 $gitium_regen_webhook = filter_input(INPUT_POST, 'GitiumSubmitRegenerateWebhook', FILTER_SANITIZE_ STRING);41 $gitium_regen_webhook = filter_input(INPUT_POST, 'GitiumSubmitRegenerateWebhook', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 42 42 if ( ! isset( $gitium_regen_webhook ) ) { 43 43 return; … … 49 49 50 50 public function regenerate_public_key() { 51 $submit_regenerate_pub_key = filter_input(INPUT_POST, 'GitiumSubmitRegeneratePublicKey', FILTER_SANITIZE_ STRING);51 $submit_regenerate_pub_key = filter_input(INPUT_POST, 'GitiumSubmitRegeneratePublicKey', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 52 52 if ( ! isset( $submit_regenerate_pub_key ) ) { 53 53 return; … … 100 100 101 101 public function save() { 102 $submit_save = filter_input(INPUT_POST, 'GitiumSubmitSave', FILTER_SANITIZE_ STRING);103 $gitignore_content = filter_input(INPUT_POST, 'gitignore_content', FILTER_SANITIZE_ STRING);102 $submit_save = filter_input(INPUT_POST, 'GitiumSubmitSave', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 103 $gitignore_content = filter_input(INPUT_POST, 'gitignore_content', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 104 104 if ( ! isset( $submit_save ) || ! isset( $gitignore_content ) ) { 105 105 return; -
gitium/trunk/inc/class-gitium-submenu-status.php
r1680884 r3146858 78 78 79 79 public function save_ignorelist() { 80 $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_ STRING);80 $gitium_ignore_path = filter_input(INPUT_POST, 'GitiumIgnorePath', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 81 81 if ( ! isset( $gitium_ignore_path ) ) { 82 82 return; … … 95 95 96 96 public function save_changes() { 97 $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_ STRING);98 $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_ STRING);97 $gitium_save_changes = filter_input(INPUT_POST, 'GitiumSubmitSaveChanges', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 98 $gitium_commit_msg = filter_input(INPUT_POST, 'commitmsg', FILTER_SANITIZE_FULL_SPECIAL_CHARS); 99 99 if ( ! isset( $gitium_save_changes ) ) { 100 100 return; -
gitium/trunk/readme.txt
r2996937 r3146858 5 5 Tags: git, version, versioning, deployment, version-control, github, bitbucket, travis, code, revision, testing, development, branch, production, staging, debug, plugin, gitium, presslabs, simple 6 6 Requires at least: 4.7 7 Tested up to: 6. 2.27 Tested up to: 6.6 8 8 Requires PHP: 5.6 9 9 License: GPLv2 10 Stable tag: 1.0. 610 Stable tag: 1.0.7 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 12 12 … … 55 55 56 56 = Manual Installation = 57 1. Upload `gitium.zip` to the `/wp-content/plugins/` directory; 58 2. Extract the `gitium.zip` archive into the `/wp-content/plugins/` directory; 59 3. Activate the plugin through the 'Plugins' menu in WordPress. 60 61 Alternatively, go into your WordPress dashboard and click on Plugins -> Add Plugin and search for `Gitium`. Then, click on Install and, after that, on Activate Now. 62 57 58 1. Go to your WordPress admin dashboard. 59 2. Navigate to 'Plugins' → 'Add New'. 60 3. Search for "Gitium". 61 4. Install and activate the Gitium plugin. 63 62 64 63 = Usage = 65 64 66 Activate the plugin and follow the on-screen instructions under the `Gitium` menu. 67 68 _IMPORTANT_: Gitium does its best not to version your WordPress core, neither your `/wp-content/uploads` folder. 65 - Connect Your Repository 66 After activation, go to the Gitium settings in your WordPress admin area. 67 Copy the Public Key that Gitium has generated for you from the Key Pair field. 68 In your repository manager of choice (GitHub, GitLab, or Bitbucket), go to the settings page and find the “Deploy keys” (or similar) section. There you will need to add the Public Key you’ve copied from Gitium. This will grant Gitium access to your repository. Make sure to allow write access as well. Also make sure that you copy the entire key from gitium. 69 Now go back to your main repository page and copy the SSH URL to your repo. Paste this URL in Gitium and press the “Fetch” button. 70 A “Repository initialized successfully” message will show up. This means that your repository has been populated with the current code of your website and it is ready to start working with Gitium. 71 72 - Initial Commit 73 Once connected, Gitium will automatically commit your existing WordPress theme and plugins to the connected repository. 74 This initial commit serves as the baseline for your site’s code. 75 76 - Making Changes 77 Make changes to your WordPress site’s code (themes, plugins) as needed. 78 Gitium will automatically commit these changes to your Git repository. 79 Using the webhook provided by Gitium, it will also automatically deploy the changes from the repository to your WordPress site. 80 81 - Webook Configuration 82 Gitium uses the webhook to automatically deploy remote changes to your server. To configure it follow these steps: 83 1. Go to your WordPress website and go to your Gitium Settings page; 84 2. Copy the full Webhook URL that Gitium provides; 85 3. In your Git Manager settings, go to Webhook section, add a new webhook and paste the webhook URL you have copied from Gitium. 86 4. Press Add, no settings changes needed. The webook simply needs a ping, nothing more. The security key is already embedded in the final URL Gitium has generated for you. 87 88 Now when you push to your repo, this webhook will automatically pull the changes to your remote server and deploy them. 89 90 You can see more details about the plugin also in our documentation here: https://www.presslabs.com/docs/code/gitium/install-gitium/ 69 91 70 92 == Frequently Asked Questions == … … 96 118 Submodules are currently not supported. 97 119 120 = Where do I report security bugs found in this plugin? = 121 122 Please report security bugs found in the source code of the Gitium plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/gitium). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 123 98 124 == Upgrade Notice == 99 = 1.0. 5=100 Fixed wrong redirection for multisite installations during initial setup 125 = 1.0.7 = 126 PHP8.1 compatibility, check if gitignore is already defined and add HOME env 101 127 102 128 == Changelog == 129 130 = 1.0.7 = 131 * Fix: HOME env definition; 132 * Fix: deprecation warnings in PHP 8.1; 133 * Compat: added composer.json package; 134 * Compat: add the possibility to use a custom `.gitignore` by defining the `GITIGNORE` constant. 103 135 104 136 = 1.0.6 =
Note: See TracChangeset
for help on using the changeset viewer.