0.7.0 • Published 10 months ago

@commitspark/git-adapter-github v0.7.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Introduction

Commitspark is a set of tools to manage structured data with Git through a GraphQL API.

This repository holds code for a Commitspark Git adapter that provides access to Git repositories hosted on GitHub.

Usage

Instantiate the adapter with createAdapter() and then call setRepositoryOptions() with GitHubRepositoryOptions on the instance. These options are as follows:

Option nameRequiredDefault valueDescription
repositoryOwnerTrueGitHub repository owner, e.g. commitspark
repositoryNameTrueGitHub repository name, e.g. git-adapter-github
accessTokenTrueGitHub access token (see details below)
pathSchemaFileFalsecommitspark/schema/schema.graphqlPath to schema file in repository
pathEntryFolderFalsecommitspark/entries/Path to folder for entries

Access Token

An accessToken may be any one of the following types of tokens:

Personal Access Tokens (classic)

A personal access token with repo scope is required.

Fine-grained Personal Access Tokens

For read-only access, a fine-grained personal access token with the following repository permissions is sufficient:

PermissionAccess
ContentsRead-only
MetadataRead-only

For write-access, permissions must be as follows:

PermissionAccess
ContentsRead and write
MetadataRead-only

In both cases, ensure the fine-grained permissions you give actually apply to the repository you want to work with.

OAuth Tokens

Access tokens for a user obtained from an OAuth app can be used in the same way (including permissions) as fine-grained personal access tokens.

License

The code in this repository is licensed under the permissive ISC license (see LICENSE).

0.7.0

10 months ago

0.6.0

10 months ago

0.5.0

2 years ago

0.4.0

2 years ago