Skip to content

Commit

Permalink
feat: use --no-edit flag to improve signing for a single commit (dc…
Browse files Browse the repository at this point in the history
…oapp#146)

Signed-off-by: Christian Kreuzberger <christian.kreuzberger@dynatrace.com>
  • Loading branch information
christian-kreuzberger-dtx authored Jan 11, 2021
1 parent 523afa2 commit 26984bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ module.exports = ({ app }) => {
}

function handleOneCommit (pr, dcoFailed) {
return `You only have one commit incorrectly signed off! To fix, first ensure you have a local copy of your branch by [checking out the pull request locally via command line](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally). Next, head to your local branch and run: \n\`\`\`bash\ngit commit --amend --signoff\n\`\`\`\nNow your commits will have your sign off. Next run \n\`\`\`bash\ngit push --force-with-lease origin ${pr.head.ref}\n\`\`\``
return `You only have one commit incorrectly signed off! To fix, first ensure you have a local copy of your branch by [checking out the pull request locally via command line](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally). Next, head to your local branch and run: \n\`\`\`bash\ngit commit --amend --no-edit --signoff\n\`\`\`\nNow your commits will have your sign off. Next run \n\`\`\`bash\ngit push --force-with-lease origin ${pr.head.ref}\n\`\`\``
}

function handleMultipleCommits (pr, commitLength, dcoFailed) {
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Object {
"output": Object {
"summary": "You only have one commit incorrectly signed off! To fix, first ensure you have a local copy of your branch by [checking out the pull request locally via command line](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally). Next, head to your local branch and run:
\`\`\`bash
git commit --amend --signoff
git commit --amend --no-edit --signoff
\`\`\`
Now your commits will have your sign off. Next run
\`\`\`bash
Expand Down Expand Up @@ -58,7 +58,7 @@ Object {
"output": Object {
"summary": "You only have one commit incorrectly signed off! To fix, first ensure you have a local copy of your branch by [checking out the pull request locally via command line](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally). Next, head to your local branch and run:
\`\`\`bash
git commit --amend --signoff
git commit --amend --no-edit --signoff
\`\`\`
Now your commits will have your sign off. Next run
\`\`\`bash
Expand Down

0 comments on commit 26984bb

Please sign in to comment.