1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage GitHub
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * GitHub API DB class for the Joomla Platform.
14 *
15 * @documentation https://developer.github.com/v3/git/
16 *
17 * @since 12.3
18 * @deprecated 4.0 Use the `joomla/github` package via Composer instead
19 *
20 * https://developer.github.com/v3/git/
21 * Git DB API
22 *
23 * The Git Database API gives you access to read and write raw Git objects to your Git database on GitHub and to list
24 * * and update your references (branch heads and tags).
25 *
26 * This basically allows you to reimplement a lot of Git functionality over our API - by creating raw objects
27 * * directly into the database and updating branch references you could technically do just about anything that
28 * * Git can do without having Git installed.
29 *
30 * Git DB API functions will return a 409 if the git repo for a Repository is empty or unavailable.
31 * * This typically means it is being created still. Contact Support if this response status persists.
32 *
33 * git db
34 *
35 * For more information on the Git object database, please read the Git Internals chapter of the Pro Git book.
36 *
37 * As an example, if you wanted to commit a change to a file in your repository, you would:
38 *
39 * get the current commit object
40 * retrieve the tree it points to
41 * retrieve the content of the blob object that tree has for that particular file path
42 * change the content somehow and post a new blob object with that new content, getting a blob SHA back
43 * post a new tree object with that file path pointer replaced with your new blob SHA getting a tree SHA back
44 * create a new commit object with the current commit SHA as the parent and the new tree SHA, getting a commit SHA back
45 * update the reference of your branch to point to the new commit SHA
46 *
47 * It might seem complex, but it’s actually pretty simple when you understand the model and it opens up a ton of
48 * things you could potentially do with the API.
49 */
50 class JGithubPackageData extends JGithubPackage
51 {
52 protected $name = 'Data';
53
54 protected $packages = array('blobs', 'commits', 'refs', 'tags', 'trees');
55 }
56