2017 © Pedro PelĂĄez
 

symfony-bundle github-contributions-bundle

Symfony2 Bundle to show Github Contributions

image

digitalkaoz/github-contributions-bundle

Symfony2 Bundle to show Github Contributions

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

GithubContributionsBundle

This Bundle lets you display some Github Statistics in your Symfony2 Application. See https://help.github.com/articles/viewing-contributions for more Information., (*1)

Build Status Scrutinizer Quality Score Code Coverage SensioLabsInsight Latest Stable Version Total Downloads, (*2)

Contribution Calendar, (*3)

, (*4)

Repositories & Contributions, (*5)

, (*6)

Installation

Add the Bundle with Composer

{
    "require" : {
        "digitalkaoz/GithubContributionsBundle" : "~1.0"
    }
}

For Caching add "liip/doctrine-cache-bundle": "~1.0" as well!, (*7)

Then update your Dependencies: php composer.phar update, (*8)

Activate the Bundle in your AppKernel

public function registerBundles()
{
    $bundles = array(
        // ...
        new digitalkaoz\GithubContributionsBundle\digitalkaozGithubContributionsBundle()
    );

    return $bundles;
}

Include the Routing File in your routing.yml

digitalkaoz_github_contributions:
    resource: "@digitalkaozGithubContributionsBundle/Resources/config/routing.xml"
    prefix:   /github

Configuration

the full configuration looks like this:, (*9)

# 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

Usage

View the Statistics

  • visit /github/contributions to view a list of repositories you have contributed to
  • visit /github/repos to view a list of your own repositories
  • visit /github/activity to view your contribution calendar (like the github one)

Generate the Caches

the calculation of your contributions may take a while, so i build some commands to generate the caches eagerly from your console/cronjobs., (*10)

  • run app/console github:contribution-update contribution digitalkaoz to update the contributions cache for digitalkaoz
  • run app/console github:contribution-update repos digitalkaoz to update the repos cache for digitalkaoz
  • run app/console github:contribution-update activity digitalkaoz to update the activity cache for digitalkaoz

Tests

everything is well tested and under CI:, (*11)

  • https://travis-ci.org/digitalkaoz/GithubContributionsBundle
  • https://scrutinizer-ci.com/g/digitalkaoz/GithubContributionsBundle/
  • https://insight.sensiolabs.com/projects/a74d75ea-6aa5-4cf9-95dd-db4afbb5b2dc

TODO

  • other useful stats?
  • more generic approach for hooking own stats collectors?

The Versions

12/06 2014

dev-master

9999999-dev

Symfony2 Bundle to show Github Contributions

  Sources   Download

MIT

The Requires

 

bundle symfony github

02/11 2013

1.0.2

1.0.2.0

Symfony2 Bundle to show Github Contributions

  Sources   Download

MIT

The Requires

 

bundle symfony github

01/11 2013

1.0.1

1.0.1.0

Symfony2 Bundle to show Github Contributions

  Sources   Download

MIT

The Requires

 

bundle symfony github

01/11 2013

1.0

1.0.0.0

Symfony2 Bundle to show Github Contributions

  Sources   Download

MIT

The Requires

 

bundle symfony github