Skip to content

Commit

Permalink
fix: disable gpg signing on initial commit (#1615)
Browse files Browse the repository at this point in the history
## PR Checklist

- [x] Addresses an existing open issue: fixes #1275
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Fixes the issue by disabling GPG signing altogether. 

It would be nice to detect if the user is on a GUI, or wait up to only a
second for the first commit... but that adds complications and race
conditions (what if the first commit is running some other commands?).

💖
  • Loading branch information
JoshuaKGoldberg authored Aug 11, 2024
1 parent 9be81d9 commit d6262a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/create/createWithOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe("createWithOptions", () => {
[
[
"git commit --message ",
"",
" --no-gpg-sign",
],
"feat: initialized repo ✨",
],
Expand Down
2 changes: 1 addition & 1 deletion src/create/createWithOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function createWithOptions({ github, options }: GitHubAndOptions) {
await withSpinner("Initializing GitHub repository", async () => {
await $`git remote add origin https://github.com/${options.owner}/${options.repository}`;
await $`git add -A`;
await $`git commit --message ${"feat: initialized repo ✨"}`;
await $`git commit --message ${"feat: initialized repo ✨"} --no-gpg-sign`;
await $`git push -u origin main --force`;
await initializeGitHubRepository(github.octokit, options);
});
Expand Down

0 comments on commit d6262a2

Please sign in to comment.