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

git-commit-push-via-github-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-commit-push-via-github-api - npm Package Compare versions

Comparing version

to
1.0.2

14

lib/git-commit-push-via-github-api.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GitHubApi = require("github");
var GitHubApi = require("@octokit/rest");
var debug = require("debug")("git-commit-push-via-github-api");

@@ -8,3 +8,3 @@ var GITHUB_API_TOKEN = process.env.GITHUB_API_TOKEN;

return new Promise(function (resolve, reject) {
github.gitdata.getReference({
github.git.getRef({
owner: options.owner,

@@ -27,3 +27,3 @@ repo: options.repo,

if (typeof file.path === "string" && typeof file.content === "string") {
return github.gitdata
return github.git
.createBlob({

@@ -45,3 +45,3 @@ owner: options.owner,

else if (typeof file.path === "string" && Buffer.isBuffer(file.content)) {
return github.gitdata
return github.git
.createBlob({

@@ -67,3 +67,3 @@ owner: options.owner,

// TODO: d.ts bug?
github.gitdata.createTree({
github.git.createTree({
owner: options.owner,

@@ -86,3 +86,3 @@ repo: options.repo,

return new Promise(function (resolve, reject) {
github.gitdata.createCommit({
github.git.createCommit({
owner: options.owner,

@@ -105,3 +105,3 @@ repo: options.repo,

return new Promise(function (resolve, reject) {
github.gitdata.updateReference({
github.git.updateRef({
owner: options.owner,

@@ -108,0 +108,0 @@ repo: options.repo,

@@ -14,3 +14,3 @@ {

"name": "git-commit-push-via-github-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "Git commit and push by using GitHub API. No depended Git binary.",

@@ -49,3 +49,3 @@ "main": "lib/git-commit-push-via-github-api.js",

"husky": "^0.14.3",
"lint-staged": "^4.3.0",
"lint-staged": "^8.1.0",
"mocha": "^4.0.1",

@@ -68,6 +68,6 @@ "prettier": "^1.7.4",

"dependencies": {
"@octokit/rest": "^16.3.0",
"@types/debug": "^0.0.30",
"debug": "^3.1.0",
"github": "^11.0.0"
"debug": "^3.1.0"
}
}

@@ -1,2 +0,2 @@

import * as GitHubApi from "github";
import * as GitHubApi from "@octokit/rest";

@@ -7,3 +7,3 @@ const debug = require("debug")("git-commit-push-via-github-api");

return new Promise((resolve, reject) => {
github.gitdata.getReference(
github.git.getRef(
{

@@ -30,3 +30,3 @@ owner: options.owner,

if (typeof file.path === "string" && typeof file.content === "string") {
return github.gitdata
return github.git
.createBlob({

@@ -47,3 +47,3 @@ owner: options.owner,

} else if (typeof file.path === "string" && Buffer.isBuffer(file.content)) {
return github.gitdata
return github.git
.createBlob({

@@ -69,3 +69,3 @@ owner: options.owner,

// TODO: d.ts bug?
github.gitdata.createTree(
github.git.createTree(
{

@@ -92,3 +92,3 @@ owner: options.owner,

return new Promise((resolve, reject) => {
github.gitdata.createCommit(
github.git.createCommit(
{

@@ -115,3 +115,3 @@ owner: options.owner,

return new Promise((resolve, reject) => {
github.gitdata.updateReference(
github.git.updateRef(
{

@@ -118,0 +118,0 @@ owner: options.owner,

Sorry, the diff of this file is not supported yet