github-cherry-pick
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,0 +0,0 @@ import * as Octokit from "@octokit/rest"; |
@@ -38,3 +38,3 @@ "use strict"; | ||
const retrieveCommitDetails = ({ commit, octokit, owner, repo, }) => __awaiter(this, void 0, void 0, function* () { | ||
const { data: { author, committer, message, parents: [{ sha: parent }], }, } = yield octokit.git.getCommit({ | ||
const { data: { author, committer, message, parents }, } = yield octokit.git.getCommit({ | ||
commit_sha: commit, | ||
@@ -44,3 +44,7 @@ owner, | ||
}); | ||
return { author, committer, message, parent }; | ||
if (parents.length > 1) { | ||
throw new Error(`Commit ${commit} has ${parents.length} parents.` + | ||
` github-cherry-pick is designed for the rebase workflow and doesn't support merge commits.`); | ||
} | ||
return { author, committer, message, parent: parents[0].sha }; | ||
}); | ||
@@ -47,0 +51,0 @@ const createSiblingCommit = ({ commit, head: { author, committer, ref, tree }, octokit, owner, parent, repo, }) => __awaiter(this, void 0, void 0, function* () { |
@@ -14,2 +14,3 @@ { | ||
"jest": "^23.6.0", | ||
"jest-circus": "^23.6.0", | ||
"jest-junit": "^6.0.1", | ||
@@ -46,3 +47,3 @@ "prettier": "^1.15.3", | ||
}, | ||
"version": "1.0.0" | ||
"version": "1.0.1" | ||
} |
@@ -1,3 +0,2 @@ | ||
[![npm version](https://img.shields.io/npm/v/github-cherry-pick.svg)](https://npmjs.org/package/github-cherry-pick) | ||
[![build status](https://img.shields.io/circleci/project/github/tibdex/github-cherry-pick.svg)](https://circleci.com/gh/tibdex/github-cherry-pick) | ||
[![npm version](https://img.shields.io/npm/v/github-cherry-pick.svg)](https://npmjs.org/package/github-cherry-pick) [![build status](https://img.shields.io/circleci/project/github/tibdex/github-cherry-pick.svg)](https://circleci.com/gh/tibdex/github-cherry-pick) | ||
@@ -19,2 +18,3 @@ # Goal | ||
// The commits will be cherry-picked in the order they appear in the array. | ||
// Merge commits are not supported. | ||
// See https://git-scm.com/docs/git-cherry-pick for more details. | ||
@@ -41,3 +41,4 @@ commits: [ | ||
`github-cherry-pick` uses [`debug`](https://www.npmjs.com/package/debug) to log helpful information at different steps of the cherry-picking process. To enable these logs, set the `DEBUG` environment variable to `github-cherry-pick`. | ||
`github-cherry-pick` uses [`debug`](https://www.npmjs.com/package/debug) to log helpful information at different steps of the cherry-picking process. | ||
To enable these logs, set the `DEBUG` environment variable to `github-cherry-pick`. | ||
@@ -44,0 +45,0 @@ # How it Works |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15397
197
195
9