PHP code example of premekkoch / github-service
1. Go to this page and download the library: Download premekkoch/github-service 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/ */
premekkoch / github-service example snippets
/** @var PremekKoch\GitHub\GitHubService @inject */
public $githubService;
:
$file = 'test.md';
$this->githubService->getFileLastCommit($file, TRUE);
:
$this->githubService->refreshGithubCache();
$tree = $this->gitHubService->getFilesTree();
foreach ($tree as $file) {
if (strpos($file->path, '.md')) {
$this->gitHubService->getFileLastCommit($file->path, FALSE);
}