Socket
Socket
Sign inDemoInstall

tinacms-gitprovider-github

Package Overview
Dependencies
3
Maintainers
0
Versions
275
Alerts
File Explorer

Advanced tools

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.


Version published
Maintainers
0
Created

Readme

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

Last updated on 16 Jul 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc