@porch/gatsby-source-gitlab-projects

0.2.0 • Public • Published

gatsby-source-gitlab-projects

Gatsby source plugin for fetching project metadata for projects in Gitlab.

Usage

npm install @porch/gatsby-source-gitlab-projects

Add the following to your gatsby-config.js:

module.exports = {
 plugins: [
    {
      resolve: '@porch/gatsby-source-gitlab-projects',
      options: {
        gitlab: {
          domain: 'your-gitlab-domain',
          privateToken: 'your-private-token',
        },
        includeReadme: true,
        searchParams: {
            // See https://docs.gitlab.com/ee/api/projects.html#list-all-projects
        },
        groupId: 1 // If provided, will fetch all projects for the given group, see https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects
      }
    }
};

Sample Gatsbys GraphQL query:

{
  allGitLabProject {
    edges {
      node {
        id
        project {
          name
          name_with_namespace
          description
          path
          web_url
          namespace {
            id
            name
          }
        }
      }
    }
  }
}

Read the Gatsby documentation for help on using GraphQL.

Readme

Keywords

none

Package Sidebar

Install

npm i @porch/gatsby-source-gitlab-projects

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

7.1 kB

Total Files

6

Last publish

Collaborators

  • matthoffner
  • anthonygrove
  • porchdotcom
  • pwmckenna