danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.22k stars 363 forks source link

Improve the init CLI #1436

Closed orta closed 3 months ago

orta commented 3 months ago

It's been 7 years, time for a re-look.

7rulnik commented 3 months ago

@orta feels that something went wrong here

❯ yarn danger init
Welcome to Danger Init - this will take you through setting up Danger for this project.
There are four main steps we need to do:

(node:77660) [DEP0170] DeprecationWarning: The URL http://git@github.com:KosyanMedia/selene.git is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
 - [ ] Create a Dangerfile and add a few simple rules.
 - [ ] Potentially create a GitHub account for Danger to use, for messaging.
 - [ ] Set up an access token for Danger to comment with.
 - [ ] Set up Danger to run on your CI.

But before we start, we need one bit of information from you.
Is this is for an Open Source or private project?

[1] Open Source
[2] Private Repo
[0] CANCEL

1

## Step 1: Creating a starter Dangerfile

I've set up an example Dangerfile for you in this folder.

node:fs:2350
    validateStringAfterArrayBufferView(data, 'data');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Promise
    at Object.writeFileSync (node:fs:2350:5)
    at /Users/v7rulnik/projects/selene/node_modules/danger/distribution/commands/danger-init.js:177:20
    at step (/Users/v7rulnik/projects/selene/node_modules/danger/distribution/commands/danger-init.js:53:23)
    at Object.next (/Users/v7rulnik/projects/selene/node_modules/danger/distribution/commands/danger-init.js:34:53)
    at fulfilled (/Users/v7rulnik/projects/selene/node_modules/danger/distribution/commands/danger-init.js:25:58) {
  code: 'ERR_INVALID_ARG_TYPE'
}
orta commented 3 months ago

Thanks! Must be the prettier changes