Github Force

Pre Reqs



Manually Create

Add Remote Site Setting

    Remote Site Name: Github
    Remote Site URL:
    Active: Checked

Custom Setting

    Label: Github API
    Object Name: Github_API
    Setting Type: Hierarchy
    Visibility: Public

    Custom Fields

        Field Label: Organization
        Field Name: Organization
        Field Type: Text
        Length: 80

        Field Label: Team
        Field Name: Team
        Field Type: Text
        Length: 80

        Field Label: Token
        Field Name: oAuth_Token
        Field Type: Text
        Length: 40

Populate Custom Setting Values

    Organization: Github Organization name that contains your teams
    Team: Github team name that you want users added and removed from (see "Generate API Token for Github" below)
    Token: Generate an API token (see "Generate API Token for Github" below)

Generate API Token for Github

    1. Create a Github Organization
    2. Edit your Organizations profile and register a new application
    3. Replace the placeholders below with your newly generated client_id and client_secret.
    4. Replace the github_username with the username of an admin or owner of the Organization
    5. Create a new Team for your Organization
    6. Execute the following curl command

    curl -X POST -H "Content-Type: application/json" -u <github_username> -d '{"scopes": ["repo"], "client_id": "<client_id>", "client_secret": "<client_secret>"}'

    7. Copy & Paste the "token" value into the Token Custom Field above.