Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-github-contributors

npm

A Gatsby source plugin for pulling all the contributors for a github repository.

Install

via npm

npm install --save gatsby-source-github-contributors

or via yarn

yarn add gatsby-source-github-contributors

Example

Getting data from two different tables:

// In gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-github-contributors`,
    options: {
      repo: "strawberry-graphql/strawberry"
    }
  }
];

Get all the contributors via GraphQL

{
    allGitHubContributor {
        nodes {
            login
            name
            url
        }
    }
}

API Keys

This source doesn't require API keys but, since GitHub throttles requests, it is recommended to use a token or app credentials.

Using a token

// In gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-github-contributors`,
    options: {
      repo: "strawberry-graphql/strawberry",
      token: process.env.GITHUB_TOKEN
    }
  }
];

For more authentication options, refer to github-base docs.

About

Gatsby Source that fetches github contributors for a repository

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages