Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating initial commits for PR #55

Closed
wolfy1339 opened this issue Jun 27, 2022 · 6 comments · Fixed by #82
Closed

Error creating initial commits for PR #55

wolfy1339 opened this issue Jun 27, 2022 · 6 comments · Fixed by #82
Labels

Comments

@wolfy1339
Copy link
Contributor

Creating .
$ git init
$ git checkout -b main
LICENSE created
CODE_OF_CONDUCT.md created
CONTRIBUTING.md created
README.md created
$ git add LICENSE.md
$ git commit -m 'docs(LICENSE): ISC'
$ git add CODE_OF_CONDUCT.md
$ git commit -m 'docs(CODE_OF_CONDUCT): Contributor Covenant'
$ git add CONTRIBUTING.md
$ git commit -m 'docs(CONTRIBUTING): initial version'
$ git add README.md
$ git commit -m 'docs(README): initial version'
$ git add .github/ISSUE_TEMPLATE
$ git commit -m 'docs(ISSUE_TEMPLATES): initial version'
> POST /user/repos
  accept: application/vnd.github.v3+json
  user-agent: octokit-core.js/3.6.0 Node.js/16.15.0 (linux; x64)
  content-type: application/json; charset=utf-8

  name: 'octoherd-script-remove-eol-node-versions'
  description: 'An octoherd script to remove EOL NodeJS versions from @octokit repositories'
  private: false
  has_wiki: false
  has_projects: false
  allow_merge_commit: false
  allow_rebase_merge: false
  delete_branch_on_merge: true
> PUT /repos/wolfy1339/octoherd-script-remove-eol-node-versions/topics
  accept: application/vnd.github.mercy-preview+json
  user-agent: octokit-core.js/3.6.0 Node.js/16.15.0 (linux; x64)
  content-type: application/json; charset=utf-8

  names: [ 'octoherd-script' ]
$ git remote add origin [email protected]:wolfy1339/octoherd-script-remove-eol-node-versions.git
$ git push -u origin HEAD
$ git checkout -b initial-version
$ git commit README.md -m 'docs(README): remove WIP note'
Error: Command failed with exit code 1: git commit README.md -m 'docs(README): remove WIP note'
On branch initial-version
nothing to commit, working tree clean
    at makeError (file:///home/user/.npm/_npx/a543ff98fce0558b/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///home/user/.npm/_npx/a543ff98fce0558b/node_modules/execa/index.js:119:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async command (file:///home/user/.npm/_npx/a543ff98fce0558b/node_modules/create-octoherd-script/lib/command.js:5:30)
    at async main (file:///home/user/.npm/_npx/a543ff98fce0558b/node_modules/create-octoherd-script/cli.js:154:5) {
  shortMessage: "Command failed with exit code 1: git commit README.md -m 'docs(README): remove WIP note'",
  command: "git commit README.md -m 'docs(README): remove WIP note'",
  escapedCommand: `"git commit README.md -m 'docs(README): remove WIP note'"`,
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: 'On branch initial-version\nnothing to commit, working tree clean',
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
All done.
@gr2m
Copy link
Member

gr2m commented Jun 27, 2022

Hmm very odd, I can't recall to have seen this one. Did you by chance check if that problem occurs every time?

It sounds as if something went wrong with the README updates, as if you commit the change before the script did?

@wolfy1339
Copy link
Contributor Author

I deleted the repo, and ran the script a couple times with the same result.

I had created the repo on GitHub, and locally before, but then remembered about #37, so I deleted the repo online and locally. There shouldn't have been any commits

@gr2m
Copy link
Member

gr2m commented Jun 27, 2022

Thanks for checking, I hope to be able to look into this in the coming weeks, I hope to find some time to work on @octoherd again it's been a while :)

@gr2m
Copy link
Member

gr2m commented Jun 27, 2022

Hm I just ran npm init octoherd-script and didn't get the error 🤔 Can you share more about your system environment and how you ran create-octoherd-script?

@kfcampbell
Copy link
Contributor

I also ran into this today! I'm not sure why.

I'm using Node 18.12.1 and NPM 8.19.2 and this error is happening to me on 100% of calls to npm init octoherd-script on my PopOS machine. For what it's worth, I'm managing Node versions with nvm.

@github-actions
Copy link

🎉 This issue has been resolved in version 1.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants