@himenon/github-api-create-commit
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

@himenon/github-api-create-commit

Create a Commit to GitHub via WebAPI.

Install

yarn add @himenon/github-api-create-commit

pnpm add @himenon/github-api-create-commit

Usage

import * as GitHubApiCreateCommit from "@himenon/github-api-create-commit";

const github = GitHubApiCreateCommit.create({
  owner: "Himenon",
  repo: "github-api-create-commit",
  accessToken: "",
});

await github.createGitCommit({
  baseBranchName: "master",
  headBranchName: "develop",
  commitMessage: "feat: add markdown file",
  files: [
    {
      path: "hello-world.md",
      content: "# Hello world",
    },
  ],
});

Shell scripts with the same meaning

git checkout -b develop origin/master
echo "# Hello world" > hello-world.md
git add hello-world.md
git commit -m "feat: add markdown file"
git push develop

LICENCE

@Himenon/github-api-create-commit・MIT

Package Sidebar

Install

npm i @himenon/github-api-create-commit

Weekly Downloads

4

Version

2.1.3

License

MIT

Unpacked Size

3.19 MB

Total Files

18

Last publish

Collaborators

  • himenoglyph