Skip to content

Commit 0df39de

Browse files
author
Cain Watson
committed
fix: Use new api function names
1 parent 7099121 commit 0df39de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/git-commit-push-via-github-api.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const debug = require("debug")("git-commit-push-via-github-api");
44
const GITHUB_API_TOKEN = process.env.GITHUB_API_TOKEN;
55
const getReferenceCommit = function(github: GitHubApi, options: GitCommitPushOptions) {
66
return new Promise((resolve, reject) => {
7-
github.gitdata.getReference(
7+
github.git.getRef(
88
{
99
owner: options.owner,
1010
repo: options.repo,
@@ -26,7 +26,7 @@ const createTree = function(github: GitHubApi, options: GitCommitPushOptions, da
2626
return new Promise((resolve, reject) => {
2727
const promises = options.files.map(file => {
2828
if (typeof file.path === "string" && typeof file.content === "string") {
29-
return github.gitdata
29+
return github.git
3030
.createBlob({
3131
owner: options.owner,
3232
repo: options.repo,
@@ -42,7 +42,7 @@ const createTree = function(github: GitHubApi, options: GitCommitPushOptions, da
4242
};
4343
});
4444
} else if (typeof file.path === "string" && Buffer.isBuffer(file.content)) {
45-
return github.gitdata
45+
return github.git
4646
.createBlob({
4747
owner: options.owner,
4848
repo: options.repo,
@@ -63,7 +63,7 @@ const createTree = function(github: GitHubApi, options: GitCommitPushOptions, da
6363
return Promise.all(promises).then(files => {
6464
debug("files: %O", files);
6565
// TODO: d.ts bug?
66-
github.gitdata.createTree(
66+
github.git.createTree(
6767
{
6868
owner: options.owner,
6969
repo: options.repo,
@@ -85,7 +85,7 @@ const createTree = function(github: GitHubApi, options: GitCommitPushOptions, da
8585

8686
const createCommit = function(github: GitHubApi, options: GitCommitPushOptions, data: any) {
8787
return new Promise((resolve, reject) => {
88-
github.gitdata.createCommit(
88+
github.git.createCommit(
8989
{
9090
owner: options.owner,
9191
repo: options.repo,
@@ -107,7 +107,7 @@ const createCommit = function(github: GitHubApi, options: GitCommitPushOptions,
107107

108108
const updateReference = function(github: GitHubApi, options: GitCommitPushOptions, data: any) {
109109
return new Promise((resolve, reject) => {
110-
github.gitdata.updateReference(
110+
github.git.updateRef(
111111
{
112112
owner: options.owner,
113113
repo: options.repo,

0 commit comments

Comments
 (0)