PHP code example of lucamauri / page-to-github

1. Go to this page and download the library: Download lucamauri/page-to-github library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lucamauri / page-to-github example snippets


wfLoadExtension( 'PageToGitHub' );

$wgP2GAuthToken    = 'your-github-personal-access-token';
$wgP2GIgnoreMinor  = true;
$wgP2GNameSpace    = 'Module';
$wgP2GOwner        = 'github-username-or-organisation';
$wgP2GRepo         = 'repository-name';
$wgP2GKeyword      = '';      // optional
$wgP2GAddKeyword   = false;   // optional

$wgShowExceptionDetails = true;
$wgDebugLogGroups['PageToGitHub'] = "/var/log/mediawiki/PageToGitHub-{$wgDBname}.log";