gatsby-source-github-contributors

    0.1.10 • Public • Published

    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.

    Install

    npm i gatsby-source-github-contributors

    DownloadsWeekly Downloads

    10

    Version

    0.1.10

    License

    MIT

    Unpacked Size

    7.28 kB

    Total Files

    17

    Last publish

    Collaborators

    • patrick91