{"id":19357745,"url":"https://github.com/joomla-framework/github-api","last_synced_at":"2025-04-04T17:05:56.651Z","repository":{"id":7094504,"uuid":"8385788","full_name":"joomla-framework/github-api","owner":"joomla-framework","description":"Joomla Framework GitHub Package","archived":false,"fork":false,"pushed_at":"2024-10-08T21:11:37.000Z","size":5719,"stargazers_count":27,"open_issues_count":4,"forks_count":29,"subscribers_count":18,"default_branch":"3.x-dev","last_synced_at":"2025-03-28T16:05:33.626Z","etag":null,"topics":["github","joomla","joomla-framework","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joomla-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"joomla","custom":"https://community.joomla.org/sponsorship-campaigns.html"}},"created_at":"2013-02-24T03:21:44.000Z","updated_at":"2024-12-04T21:57:50.000Z","dependencies_parsed_at":"2024-12-29T19:21:52.531Z","dependency_job_id":"ebb7ee30-ef25-4840-bc4e-43ab89a27971","html_url":"https://github.com/joomla-framework/github-api","commit_stats":{"total_commits":254,"total_committers":19,"mean_commits":"13.368421052631579","dds":0.5275590551181102,"last_synced_commit":"01e24ca4da896de49b8b15205dd6327a40697614"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgithub-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgithub-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgithub-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgithub-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joomla-framework","download_url":"https://codeload.github.com/joomla-framework/github-api/tar.gz/refs/heads/3.x-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217174,"owners_count":20903008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","joomla","joomla-framework","php"],"created_at":"2024-11-10T07:09:02.354Z","updated_at":"2025-04-04T17:05:56.627Z","avatar_url":"https://github.com/joomla-framework.png","language":"PHP","readme":"# The GitHub Package [![Build Status](https://ci.joomla.org/api/badges/joomla-framework/github-api/status.svg?ref=refs/heads/2.0-dev)](https://ci.joomla.org/joomla-framework/github-api)\n\n[![Latest Stable Version](https://poser.pugx.org/joomla/github/v/stable)](https://packagist.org/packages/joomla/github)\n[![Total Downloads](https://poser.pugx.org/joomla/github/downloads)](https://packagist.org/packages/joomla/github)\n[![Latest Unstable Version](https://poser.pugx.org/joomla/github/v/unstable)](https://packagist.org/packages/joomla/github)\n[![License](https://poser.pugx.org/joomla/github/license)](https://packagist.org/packages/joomla/github)\n\n## Using the GitHub Package\n\nThe GitHub package is designed to be a straightforward interface for working with GitHub. It is based on version 3 of\nthe GitHub API. You can find documentation on the API at [http://developer.github.com/v3/](http://developer.github.com/v3/).\n\nGitHub is built upon the Http package which provides an easy way to consume URLs and web services in a transport\nindependent way. `Joomla\\Http` currently supports streams, sockets and cURL. It is possible to create a custom\ncontext and inject it into the GitHub class if one so desires.\n\n### Instantiating GitHub\n\nInstantiating GitHub is easy:\n\n```php\nuse Joomla\\Github\\Github;\n\n$github = new Github;\n```\n\nThis creates a basic GitHub object that can be used to access publicly available resources on [github.com](https://github.com).\n\nSometimes it is necessary to specify additional options. This can be done by injecting in a Registry object with your\npreferred options. Support is available for optionally providing a custom GitHub account username and password,\nas well as a custom URL for the GitHub server (as would be the case for using a local instance of [GitHub Enterprise](https://enterprise.github.com)).\n\n```php\nuse Joomla\\Github\\Github;\nuse Joomla\\Registry\\Registry;\n\n$options = new Registry;\n$options-\u003eset('api.username', 'github_username');\n$options-\u003eset('api.password', 'github_password');\n$options-\u003eset('api.url', 'http://github.enterprise.example.com');\n\n$github = new Github($options);\n```\n\nA `gh.token` option is also available.\n\nHere is an example demonstrating more of the GitHub package:\n\n```php\nuse Joomla\\Github\\Github;\nuse Joomla\\Registry\\Registry;\n\n$options = new Registry;\n$options-\u003eset('api.username', 'github_username');\n$options-\u003eset('api.password', 'github_password');\n$options-\u003eset('api.url', 'http://myhostedgithub.example.com');\n\n$github = new Github($options);\n\n// get a list of all the user's issues\n$issues = $github-\u003eissues-\u003egetList();\n\n$issueSummary = array();\n\nforeach ($issues as $issue)\n{\n    $issueSummary[] = '+ ' . $issue-\u003etitle;\n}\n\n$summary = implode(\"\\n\", $issueSummary);\n\n$github-\u003egists-\u003ecreate(array('issue_summary.txt' =\u003e $summary));\n```\n\n## Accessing the GitHub APIs\n\nThe GitHub object using magic methods to access sub-packages of the GitHub server's API that can be accessed using\nthe `-\u003e` object operator.\n\nWhere a result is returned by a PHP method, the result is the PHP equivalent of the JSON response that can be found in\nthe GitHub API documentation.\n\n### Activity\n\nSee http://developer.github.com/v3/activity/.\n\n#### Events\n\nSee http://developer.github.com/v3/activity/events/.\n\n```php\n// List public events.\n$events = $github-\u003eactivity-\u003eevents-\u003egetPublic();\n\n// List repository events.\n$events = $github-\u003eactivity-\u003eevents-\u003egetRepository(':owner', ':repo');\n\n// List issue events for a repository.\n$events = $github-\u003eactivity-\u003eevents-\u003egetIssue(':owner', ':repo');\n\n// List public events for a network of repositories.\n$events = $github-\u003eactivity-\u003eevents-\u003egetNetwork(':owner', ':repo');\n\n// List public events for an organization.\n$events = $github-\u003eactivity-\u003eevents-\u003egetOrg(':org');\n\n// List events that a user has received.\n$events = $github-\u003eactivity-\u003eevents-\u003egetUser(':user');\n\n// List public events that a user has received.\n$events = $github-\u003eactivity-\u003eevents-\u003egetUserPublic(':user');\n\n// List events performed by a user.\n$events = $github-\u003eactivity-\u003eevents-\u003egetByUser(':user');\n\n// List public events performed by a user.\n$events = $github-\u003eactivity-\u003eevents-\u003egetByUserPublic(':user');\n\n// List events for an organization\n$events = $github-\u003eactivity-\u003eevents-\u003egetUserOrg(':user', ':org');\n```\n\n#### Notifications\n\nSee http://developer.github.com/v3/activity/notifications/.\n\n```php\n// List your notifications.\n$all = true;\n$participating = true;\n$since = new Date('2012-12-12');\n$notifications = $github-\u003eactivity-\u003enotifications-\u003egetList($all, $participating, $since);\n\n// List your notifications in a repository.\n$notifications = $github-\u003eactivity-\u003enotifications-\u003egetListRepository(':owner', ':repo', $all, $participating, $since);\n\n// Mark as read.\n$unread = true;\n$read = true;\n$lastReadAt = new Date('2012-12-12');\n$github-\u003eactivity-\u003enotifications-\u003egetListRepository($unread, $read, $lastReadAt);\n\n// Mark notifications as read in a repository.\n$github-\u003eactivity-\u003enotifications-\u003egetListRepository(':owner', ':repo', $unread, $read, $lastReadAt);\n\n// View a single thread.\n$thread = $github-\u003eactivity-\u003enotifications-\u003eviewThread(':id');\n\n// Mark a thread as read.\n$github-\u003eactivity-\u003enotifications-\u003emarkReadThread(':id', $unread, $read);\n\n// Get a Thread Subscription.\n$subscription = $github-\u003eactivity-\u003enotifications-\u003egetThreadSubscription(':id');\n\n// Set a Thread Subscription.\n$subscribed = true;\n$ignored = false;\n$github-\u003eactivity-\u003enotifications-\u003esetThreadSubscription(':id', $subscribed, $ignored);\n\n// Delete a Thread Subscription.\n$github-\u003eactivity-\u003enotifications-\u003edeleteThreadSubscription(':id');\n```\n\n#### Starring\n\nSee http://developer.github.com/v3/activity/starring/.\n\n```php\n// List Stargazers.\n$starred = $github-\u003eactivity-\u003estarring-\u003egetList(':owner', ':repo');\n\n// List repositories being starred.\n$starred = $github-\u003eactivity-\u003estarring-\u003egetRepositories(':user');\n\n// Check if you are starring a repository.\n// @return  boolean  True for a 204 response, False for a 404.\n$isStarred = $github-\u003eactivity-\u003estarring-\u003echeck(':owner', ':repo');\n\n// Star a repository.\n$github-\u003eactivity-\u003estarring-\u003estar(':owner', ':repo');\n\n// Unstar a repository.\n$github-\u003eactivity-\u003estarring-\u003eunstar(':owner', ':repo');\n```\n\n#### Watching\n\nSee http://developer.github.com/v3/activity/watching/.\n\n```php\n// List watchers.\n$watchers = $github-\u003eactivity-\u003ewatching-\u003egetList(':owner', ':repo');\n\n// List repositories being watched.\n$repos = $github-\u003eactivity-\u003ewatching-\u003egetRepositories(':user');\n\n// Get a Repository Subscription.\n$github-\u003eactivity-\u003ewatching-\u003egetSubscription(':owner', ':repo');\n\n// Set a Repository Subscription.\n$subscribed= true;\n$ignored = false;\n$subscription = $github-\u003eactivity-\u003ewatching-\u003esetSubscription(':owner', ':repo', $subscribed, $ignored);\n\n// Delete a Repository Subscription.\n$github-\u003eactivity-\u003ewatching-\u003edeleteSubscription(':owner', ':repo');\n\n// Check if you are watching a repository (LEGACY).\n// @return  boolean  True for a 204 response, False for a 404.\n$github-\u003eactivity-\u003ewatching-\u003echeck(':owner', ':repo');\n\n// Watch a repository (LEGACY).\n$github-\u003eactivity-\u003ewatching-\u003ewatch(':owner', ':repo');\n\n// Stop watching a repository (LEGACY).\n$github-\u003eactivity-\u003ewatching-\u003eunwatch(':owner', ':repo');\n```\n\n### Gists\n\nSee http://developer.github.com/v3/gists/.\n\n```php\n// List gists.\n$page = 0;\n$limit = 20;\n$gists = $github-\u003egists-\u003egetList($page, $limit);\n\n// List a user’s gists.\n$gists = $github-\u003egists-\u003egetListByUser(':user', $page, $limit);\n\n// List all public gists\n$gists = $github-\u003egists-\u003egetListPublic($page, $limit);\n\n// List the authenticated user’s starred gists.\n$gists = $github-\u003egists-\u003egetListStarred($page, $limit);\n\n// Get a single gist.\n$gist = $github-\u003egists-\u003eget(':id');\n\n// Create a gist.\n$public = true;\n$github-\u003egists-\u003ecreate(array(':local-file-path'), $public, ':description');\n\n// Edit a gist.\n$github-\u003egists-\u003eedit(':id', $files = array(':local-file-path'), $public, ':description');\n\n// Star a gist.\n$github-\u003egists-\u003estar(':id');\n\n// Unstar a gist.\n$github-\u003egists-\u003eunstar(':id');\n\n// Check if a gist is starred.\n// @return  boolean  True for a 204 response, False for a 404.\n$github-\u003egists-\u003eisStarred(':id');\n\n// Fork a gist.\n$github-\u003egists-\u003efork(':id');\n\n// Delete a gist.\n$github-\u003egists-\u003ecreate(array(':id');\n```\n\n#### Comments\n\nSee http://developer.github.com/v3/gists/comments/.\n\n```php\n// List comments on a gist.\n$comments = $github-\u003egists-\u003ecomments-\u003egetList(':gistId');\n\n// Get a single comment.\n$comment = $github-\u003egists-\u003ecomments-\u003eget(':commentId');\n\n// Create a comment.\n$github-\u003egists-\u003ecomments-\u003ecreate(':gistId', 'Comment');\n\n// Edit a comment.\n$github-\u003egists-\u003ecomments-\u003eedit(':commentId', 'Comment');\n\n// Delete a comment.\n$github-\u003egists-\u003ecomments-\u003edelete(':gistId');\n```\n\n### Git Data\n\nSee http://developer.github.com/v3/git/.\n\n#### Blobs\n\nSee http://developer.github.com/v3/git/blobs/.\n\n```php\n// Get a Blob\n$blob = $github-\u003edata-\u003eblobs-\u003eget(':owner', ':repo', ':sha');\n\n// Create a Blob\n$encoding = 'utf-8';\n$github-\u003edata-\u003eblobs-\u003ecreate(':owner', ':repo', ':content', $encoding);\n```\n\n#### Commits\n\nSee http://developer.github.com/v3/git/commits/.\n\n```php\n// Get a Commit\n$commit = $github-\u003edata-\u003ecommits-\u003eget(':owner', ':repo', ':sha');\n\n//Create a Commit\n$parents = array(':sha');\n$commit = $github-\u003edata-\u003ecommits-\u003eget(':owner', ':repo', ':message', ':tree', $parents);\n```\n\n#### References\n\nSee http://developer.github.com/v3/git/refs/.\n\n```php\n// Get a Reference\n$ref = $github-\u003edata-\u003erefs-\u003eget(':owner', ':repo', ':ref');\n\n// Get all References\n$namespace = ':namespace';\n$page = 0;\n$perPage = 20;\n$refs = $github-\u003edata-\u003erefs-\u003egetList(':owner', ':repo', ':ref', $namespace, $page, $perPage);\n\n// Create a Reference\n$github-\u003edata-\u003erefs-\u003ecreate(':owner', ':repo', ':ref', ':sha');\n\n// Update a Reference\n$force = false;\n$github-\u003edata-\u003erefs-\u003eedit(':owner', ':repo', ':ref', ':sha', $force);\n\n// Delete a Reference\n$github-\u003edata-\u003erefs-\u003edelete(':owner', ':repo', ':ref');\n```\n\n#### Tags\n\nSee http://developer.github.com/v3/git/tags/.\n\n```php\n// Get a Tag\n$tag = $github-\u003edata-\u003etags-\u003eget(':owner', ':repo', ':sha');\n\n// Create a Tag Object\n$github-\u003edata-\u003etags-\u003ecreate(\n    ':owner', ':repo', ':tag', ':message', ':object_sha', ':type', ':tagger_name', ':tagger_email', ':tagger_date'\n);\n```\n\n#### Trees\n\nSee http://developer.github.com/v3/git/trees/.\n\n```php\n// Get a Tree\n$tree = $github-\u003edata-\u003etrees-\u003eget(':owner', ':repo', ':sha');\n\n// Get a Tree Recursively\n$tree = $github-\u003edata-\u003etrees-\u003egetRecursively(':owner', ':repo', ':sha');\n\n// Create a Tree\n$tree = array(\n    'path' =\u003e ':path',\n    'mode' =\u003e ':mode',\n    'type' =\u003e 'blob|tree|commit',\n    'sha' =\u003e ':sha',\n    'content' =\u003e ':content',\n);\n$github-\u003edata-\u003etrees-\u003ecreate(':owner', ':repo', $tree, ':base_tree');\n```\n\n### Issues\n\nSee http://developer.github.com/v3/issues/.\n\n```php\n// List issues\n$filter = 'assigned|created|mentioned|subscribed';\n$state = 'open|closed';\n$labels = ':label1,:label2';\n$sort = 'created|updated|comments';\n$direction = 'asc|desc';\n$since = new Date('2012-12-12');\n$page = 0;\n$perPage = 20;\n$issues = $github-\u003eissues-\u003egetList($filter, $state, $labels, $sort, $direction, $since, $page, $perPage);\n\n// List issues for a repository\n$milestone = ':milestone|*|none';\n$assignee = ':user|none';\n$mentioned = ':user';\n$issues = $github-\u003eissues-\u003egetListByRepository(\n    ':owner', ':repo', $milestone, $state, $assignee, $mentioned, $labels, $sort, $direction, $since, $page, $perPage\n);\n\n// Get a single issue\n$issue = $github-\u003eissues-\u003eget(':user', ':repo', ':issueId');\n\n// Create an issue\n$labels = array(':label');\n$github-\u003eissues-\u003ecreate(':user', ':repo', ':title', ':body', ':assignee', ':milestone', $labels);\n\n// Edit an issue\n$github-\u003eissues-\u003eedit(':user', ':repo', ':issueId', 'open|closed', ':title', ':body', ':assignee', ':milestone', $labels);\n```\n\n#### Assignees\n\nSee http://developer.github.com/v3/issues/assignees/.\n\n```php\n// List assignees\n$assignees = $github-\u003eissues-\u003eassignees-\u003egetList(':owner', ':repo');\n\n// Check assignee\n$isUserAssigned = $github-\u003eissues-\u003eassignees-\u003echeck(':owner', ':repo', ':user');\n```\n\n#### Comments\n\nSee http://developer.github.com/v3/issues/comments/\n\n```php\n// List comments on an issue\n$page = 0;\n$perPage = 20;\n$comments = $github-\u003eissues-\u003ecomments-\u003egetList(':owner', ':repo', ':issueId', $page, $perPage);\n\n// List comments in a repository\n$sort = 'created|updated';\n$direction = 'asc|desc';\n$since = new Date('2012-12-12');\n$comments = $github-\u003eissues-\u003ecomments-\u003egetRepositoryList(':owner', ':repo', $sort, $direction, $since);\n\n// Get a single comment\n$comment = $github-\u003eissues-\u003ecomments-\u003eget(':owner', ':repo', ':commentId');\n\n// Create a comment\n$github-\u003eissues-\u003ecomments-\u003eget(':owner', ':repo', ':commentId');\n\n// Edit a comment\n$github-\u003eissues-\u003ecomments-\u003eedit(':owner', ':repo', ':commentId', ':body');\n\n// Delete a comment\n$github-\u003eissues-\u003ecomments-\u003edelete(':owner', ':repo', ':commentId');\n```\n\n#### Events\n\nSee http://developer.github.com/v3/issues/events/.\n\n```php\n// List events for an issue\n$page = 0;\n$perPage = 20;\n$events = $github-\u003eissues-\u003eevents-\u003egetList(':owner', ':repo', ':issueId', $page, $perPage);\n\n// List events for a repository\n$events = $github-\u003eissues-\u003eevents-\u003egetListRepository(':owner', ':repo', ':issueId', $page, $perPage);\n\n// Get a single event\n$event = $github-\u003eissues-\u003eevents-\u003eget(':owner', ':repo', ':issueId');\n```\n\n#### Labels\n\nSee http://developer.github.com/v3/issues/labels/.\n\n```php\n// List all labels for this repository\n$labels = $github-\u003eissues-\u003elabels-\u003egetList(':owner', ':repo');\n\n// Get a single label\n$label = $github-\u003eissues-\u003elabels-\u003eget(':owner', ':repo', ':labelName');\n\n// Create a label\n$github-\u003eissues-\u003elabels-\u003ecreate(':owner', ':repo', ':labelName', ':labelColor');\n\n// Update a label\n$github-\u003eissues-\u003elabels-\u003eupdate(':owner', ':repo', ':oldLableName', ':newLabelName', ':labelColor');\n\n// Delete a label\n$github-\u003eissues-\u003elabels-\u003edelete(':owner', ':repo', ':labelName');\n\n// List labels on an issue\n$labels = $github-\u003eissues-\u003elabels-\u003egetListByIssue(':owner', ':repo', ':issueNumber');\n\n// Add labels to an issue\n$labels = array(':label1', ':label2');\n$github-\u003eissues-\u003elabels-\u003eadd(':owner', ':repo', ':issueNumber', $labels);\n\n// Remove a label from an issue\n$github-\u003eissues-\u003elabels-\u003eremoveFromIssue(':owner', ':repo', ':issueNumber', ':labelName');\n\n// Replace all labels for an issue\n$github-\u003eissues-\u003elabels-\u003ereplace(':owner', ':repo', ':issueNumber', $labels);\n\n// Remove all labels from an issue\n$github-\u003eissues-\u003elabels-\u003eremoveAllFromIssue(':owner', ':repo', ':issueNumber');\n\n// Get labels for every issue in a milestone\n$labels = $github-\u003eissues-\u003elabels-\u003egetListByMilestone(':owner', ':repo', ':milestoneNumber');\n```\n\n#### Milestones\n\nSee http://developer.github.com/v3/issues/milestones/.\n\n```php\n// List milestones for a repository\n$state = 'open|closed';\n$sort = 'due_date|completeness';\n$direction = 'asc|desc';\n$page = 0;\n$perPage = 20;\n$milestones = $github-\u003eissues-\u003emilestones-\u003egetList(':owner', ':repo', $state, $sort, $direction, $page, $perPage);\n\n// Get a single milestone\n$milestone = $github-\u003eissues-\u003emilestones-\u003eget(':owner', ':repo', ':milestoneId');\n\n// Create a milestone\n$github-\u003eissues-\u003emilestones-\u003ecreate(':owner', ':repo', ':title', $state, ':description', ':due_on');\n\n// Update a milestone\n$github-\u003eissues-\u003emilestones-\u003eedit(':owner', ':repo', ':milestoneId', ':title', $state, ':description', ':due_on');\n\n// Delete a milestone\n$github-\u003eissues-\u003emilestones-\u003edelete(':owner', ':repo', ':milestoneId');\n```\n\n### Miscellaneous\n\nSee http://developer.github.com/v3/misc/.\n\n#### Gitignore\n\nSee http://developer.github.com/v3/gitignore/\n\n```php\n// Listing available templates\n$templates = $github-\u003egitignore-\u003egetList();\n\n// Get a single template\n$raw = false;\n$template = $github-\u003egitignore-\u003eget(':name', $raw);\n```\n\n#### Markdown\n\nSee http://developer.github.com/v3/markdown/.\n\n```php\n// Render an arbitrary Markdown document\n$mode = 'gfm|markdown';\n$context = ':context';\n$github-\u003emarkdown-\u003erender(':text', $mode, $context);\n\n// Render a Markdown document in raw mode\n```\n\n#### Meta\n\nSee http://developer.github.com/v3/meta/\n\n```php\n$meta = $github-\u003egetMeta();\n```\n\n#### Ratelimit\n\nSee http://developer.github.com/v3/rate_limit/.\n\n```php\n$rateLimit = $this-\u003eauthorization-\u003egetRateLimit();\n```\n\n### Organisations\n\nSee http://developer.github.com/v3/orgs/.\n\n```php\n// List User Organizations\n$orgs = $github-\u003eorgs-\u003egetList(':user');\n\n// Get an Organization\n$orgs = $github-\u003eorgs-\u003eget(':org');\n\n// Edit an Organization\n$github-\u003eorgs-\u003eedit(':org', ':billingEmail', ':company', ':email', ':location', ':name');\n```\n\n#### Members\n\nSee\n\n```php\n// Members list\n$members = $github-\u003eorgs-\u003emembers-\u003egetList(':org');\n\n// Check membership\n$isUserMember = $github-\u003eorgs-\u003emembers-\u003echeck(':org', ':user');\n\n// Remove a member\n$github-\u003eorgs-\u003emembers-\u003eremove(':org', ':user');\n\n// Public members list\n$publicMembers = $github-\u003eorgs-\u003emembers-\u003egetListPublic(':org');\n\n// Check public membership\n$isUserPublicMember = $github-\u003eorgs-\u003emembers-\u003echeckPublic(':org', ':user');\n\n// Publicize a user’s membership\n$github-\u003eorgs-\u003emembers-\u003epublicize(':org', ':user');\n\n// Conceal a user’s membership\n$github-\u003eorgs-\u003emembers-\u003econceal(':org', ':user');\n```\n\n#### Teams\n\nSee http://developer.github.com/v3/orgs/teams/.\n\n```php\n// List teams\n$teams = $github-\u003eorgs-\u003eteams-\u003egetList(':org');\n\n// Get team\n$team = $github-\u003eorgs-\u003eteams-\u003eget(':teamId');\n\n// Create team\n$repos = array(':repoName');\n$permission = 'pull|push|admin';\n$github-\u003eorgs-\u003eteams-\u003ecreate(':org', ':name', $repos, $permission);\n\n// Edit team\n$github-\u003eorgs-\u003eteams-\u003eedit(':teamId', ':name', $permission);\n\n// Delete team\n$github-\u003eorgs-\u003eteams-\u003edelete(':teamId');\n\n// List team members\n$members = $github-\u003eorgs-\u003eteams-\u003egetListMembers(':teamId');\n\n// Get team member\n$isUserMember = $github-\u003eorgs-\u003eteams-\u003eisMember(':teamId', ':user');\n\n// Add team member\n$github-\u003eorgs-\u003eteams-\u003eaddMember(':teamId', ':user');\n\n// Remove team member\n$github-\u003eorgs-\u003eteams-\u003eremoveMember(':teamId', ':user');\n\n// List team repos\n$repos = $github-\u003eorgs-\u003eteams-\u003egetListRepos(':teamId');\n\n// Get team repo\n$isRepoManagedByTeam = $github-\u003eorgs-\u003eteams-\u003echeckRepo(':teamId', ':repo');\n\n// Add team repo\n$github-\u003eorgs-\u003eteams-\u003eaddRepo(':teamId', ':org', ':repo');\n\n// Remove team repo\n$github-\u003eorgs-\u003eteams-\u003eremoveRepo(':teamId', ':owner', ':repo');\n\n// List user teams - TODO\n```\n\n### Pull Requests\n\nSee http://developer.github.com/v3/pulls/.\n\n```php\n// List pull requests\n$state = 'open|closed';\n$page = 0;\n$perPage = 20;\n$pulls = $github-\u003epulls-\u003egetList(':owner', ':repo', $state, $page, $perPage);\n\n// Get a single pull request\n$pull = $github-\u003epulls-\u003eget(':owner', ':repo', ':pullId');\n\n// Create a pull request\n$github-\u003epulls-\u003ecreate(':owner', ':repo', ':title', ':branch|ref', ':head|ref', ':body');\n\n// Create from issue\n$github-\u003epulls-\u003ecreateFromIssue(':owner', ':repo', ':issueId', ':branch|ref', ':head|ref');\n\n// Update a pull request\n$state = 'open|closed';\n$github-\u003epulls-\u003eedit(':owner', ':repo', ':pullId', ':title', ':body', $state);\n\n// List commits on a pull request\n$commits = $github-\u003epulls-\u003ecommits(':owner', ':repo', ':pullId', $page, $perPage);\n\n// List pull requests files\n$files = $github-\u003epulls-\u003ecommits(':owner', ':repo', ':pullId', $page, $perPage);\n\n// Get if a pull request has been merged\n$isMerged = $github-\u003epulls-\u003eisMerged(':owner', ':repo', ':pullId');\n\n// Merge a pull request\n$isMerged = $github-\u003epulls-\u003emerge(':owner', ':repo', ':pullId', ':message');\n```\n\n#### Review Comments\n\nSee http://developer.github.com/v3/pulls/comments/.\n\n```php\n// List comments on a pull request\n$page = 0;\n$perPage = 20;\n$comments = $github-\u003epulls-\u003ecomments-\u003eget(':owner', ':repo', ':pullId', $page, $perPage);\n\n// List comments in a repository - TODO\n\n// Get a single comment\n$comment = $github-\u003epulls-\u003ecomments-\u003eget(':owner', ':repo', ':commentId');\n\n// Create a comment\n$github-\u003epulls-\u003ecomments-\u003ecreate(':owner', ':repo', ':pullId', ':body', ':commitId', ':filePath', ':position');\n\n// Create a comment\n$github-\u003epulls-\u003ecomments-\u003ecreateReply(':owner', ':repo', ':pullId', ':body', ':replyingToCommentId');\n\n// Edit a comment\n$github-\u003epulls-\u003ecomments-\u003eedit(':owner', ':repo', ':commentId', ':body');\n\n// Delete a comment\n$github-\u003epulls-\u003ecomments-\u003edelete(':owner', ':repo', ':commentId');\n```\n\n\n## TODO\n\n* [Event Types](http://developer.github.com/v3/activity/events/types/)\n* [Feeds](http://developer.github.com/v3/activity/feeds/)\n* [Emojis](http://developer.github.com/v3/emojis/)\n* [Render Raw Markdown](http://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode)\n* [List user teams](http://developer.github.com/v3/orgs/teams/#list-user-teams)\n* [List comments in a repo](http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository)\n\n## See Also\n\nThe following resources contain more information:  [Joomla! API Reference](http://api.joomla.org),\n[GitHub API Reference](http://developer.github.com).\n\n\n## Installation via Composer\n\nAdd `\"joomla/github\": \"~2.0\"` to the require block in your composer.json and then run `composer install`.\n\n```json\n{\n\t\"require\": {\n\t\t\"joomla/github\": \"~2.0\"\n\t}\n}\n```\n\nAlternatively, you can simply run the following from the command line:\n\n```sh\ncomposer require joomla/github \"~2.0\"\n```\n\nIf you want to include the test sources, use\n\n```sh\ncomposer require --prefer-source joomla/github \"~2.0\"\n```\n","funding_links":["https://github.com/sponsors/joomla","https://community.joomla.org/sponsorship-campaigns.html"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomla-framework%2Fgithub-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoomla-framework%2Fgithub-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomla-framework%2Fgithub-api/lists"}