forked from remi/pubwich
-
Notifications
You must be signed in to change notification settings - Fork 27
ServiceGithub
haschek edited this page Sep 9, 2012
·
4 revisions
The Github service can aggregate your recent activities on Github, it shows public repositories of users and organisations, and it includes public user gists.
You can configure all basic options of a service like title
, description
, total
and cache_limit
and special Github service options:
-
method: either
GithubRecentActivity
,GithubRepositories
orGithubGists
-
username: the username of the Github user, like in
https://github.com/username
-
owner: the username of the owner of the repositories, like in
https://github.com/owner
-
ownertype: either
users
ororgs
-
sort: either
full_name
,created
,pushed
orupdated
(default isfull_name
)
- owner: the username of the owner of the gists, like in
https://gist.github.com/owner
$github_activity = array(
'Github', 'github_activity', array(
'method' => 'GithubRecentActivity',
'username' => 'haschek',
'total' => 3,
'title' => 'Github',
'description' => 'recent activity'
)
);
$github_repos = array(
'Github', 'github_repos', array(
'method' => 'GithubRepositories',
'ownertype' => 'users',
'owner' => 'haschek',
'total' => 3,
'title' => 'My Repos',
'description' => 'recently updated repositories'
)
);
$github_gists = array(
'Github', 'github_gists', array(
'method' => 'GithubGists',
'owner' => 'haschek',
'total' => 3,
'title' => 'My Gists',
'description' => 'recently updated gists'
)
);
As this method is internally using the Feed service, you can use all Feed service keys.
- link: Github URI of the repository or gist
- description: the description of the repository or gist
- owner: the owner (as string) of the repository or gist
- date: date of creation, last update, last push (depends on config)
- name: the name of the repository
- homepage: the URI of the project homepage
- language: the language that the project is written in, e.g. PHP
- fork: boolean true, if the repository contains a fork
- stars: number of people who starred the project (was: number of people watching the project)
- forks: number of created forks
- issues: number of active issues
function GithubRepositories_itemTemplate() {
return '<li>
<a href="{{{link}}}">{{{name}}}</a> {{#fork}}(forked){{/fork}}<br/>
{{{description}}}
({{{date}}})
</li>'.PHP_EOL;
}