digitalkaoz/github-contributions-bundle
This Bundle lets you display some Github Statistics in your Symfony2 Application. See https://help.github.com/articles/viewing-contributions for more Information.
Contribution Calendar
Repositories & Contributions
Composer{
"require" : {
"digitalkaoz/GithubContributionsBundle" : "~1.0"
}
}
For Caching add "liip/doctrine-cache-bundle": "~1.0" as well!
Then update your Dependencies: php composer.phar update
AppKernelpublic function registerBundles()
{
$bundles = array(
// ...
new digitalkaoz\GithubContributionsBundle\digitalkaozGithubContributionsBundle()
);
return $bundles;
}
routing.ymldigitalkaoz_github_contributions:
resource: "@digitalkaozGithubContributionsBundle/Resources/config/routing.xml"
prefix: /github
the full configuration looks like this:
# only needed if you want to cache the github reponses (recommend)
liip_doctrine_cache:
namespaces:
github:
type: file_system
#nothing is required, but its recommended to use an api token and cache the results
digitalkaoz_github_contributions:
api_token: your_github_api_token
cache_service: liip_doctrine_cache.ns.github
username: your_github_username
templates:
contributions: digitalkaozGithubContributionsBundle:Contributions:contributions.html.twig
activity_stream: digitalkaozGithubContributionsBundle:Contributions:activity.html.twig
user_repos: digitalkaozGithubContributionsBundle:Contributions:user_repos.html.twig
/github/contributions to view a list of repositories you have contributed to/github/repos to view a list of your own repositories/github/activity to view your contribution calendar (like the github one)the calculation of your contributions may take a while, so i build some commands to generate the caches eagerly from your console/cronjobs.
app/console github:contribution-update contribution digitalkaoz to update the contributions cache for digitalkaozapp/console github:contribution-update repos digitalkaoz to update the repos cache for digitalkaozapp/console github:contribution-update activity digitalkaoz to update the activity cache for digitalkaozeverything is well tested and under CI:
How can I help you explore Laravel packages today?