🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

tinacms-gitprovider-github

Package Overview
Dependencies
Maintainers
2
Versions
601
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinacms-gitprovider-github

The Github Git Provider handles saving and deleting content to GitHub. It can be used as a prop to the `createDatabase` function.

2.0.19
latest
Source
npm
Version published
Weekly downloads
1.3K
2.01%
Maintainers
2
Weekly downloads
 
Created
Source

The Github Git Provider handles saving and deleting content to GitHub. It can be used as a prop to the createDatabase function.

Adding the GitHub Git Provider

import { GithubProvider } from 'tinacms-gitprovider-github'
// database.{ts,js}
//...

export default isLocal ? createLocalDatabase() ? createDatabase({
    gitProvider: new GitHubProvider({
        branch: process.env.GITHUB_BRANCH,
        owner: process.env.GITHUB_OWNER,
        repo: process.env.GITHUB_REPO,
        token: process.env.GITHUB_PERSONAL_ACCESS_TOKEN,
      }),,
    // ...
})

Github Git Provider Options

Required Options

OptionDescription
branchThe branch to save content to.
ownerThe owner of the repo.
repoThe repo to save content to.
tokenA Github Personal Access Token.

Optional Options

OptionDescription
commitMessageThe commit message to use when saving content. Defaults to Edited with TinaCMS.
rootPathThis path will be prefixed to all paths (good for monorepos)
octokitOptionsOptions passed to the Octokit constructor

FAQs

Package last updated on 23 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts