Skip to content

Latest commit

 

History

History
106 lines (69 loc) · 3.16 KB

CONTRIBUTING.md

File metadata and controls

106 lines (69 loc) · 3.16 KB

Contributing

🥳 First off, thanks for taking the time to contribute to can-merge! 🥳

can-merge is managed by @LJHarb, which is hosted on GitHub.

To see a more comprehensive guide as to how to go about contributing to this project, including suggestions about how to make a PR, finding your first issue, submitting a good bug report, as well as coding conventions, please click here.

Installing can-merge

Export your GitHub Personal Access Token in your .bash_profile, .zsh_profile, etc:

export GITHUB_TOKEN = "<github access token>"

Run the following commands:

npm install
npm link

Add CLI arguments as needed (see Usage)

node .

Navigate to another repository on your computer, and run:

can-merge

You should be able to drop into the CLI, generate a token, and play around in the can-merge interface.

Testing

can-merge uses the test framework tape.

To run all tests for can-merge, run:

npm test

Or

npm run tests-only

There are multiple ways to run a test in isolation:

npx tape test/*test.js
node test/utils/*test.js

All of these methods will produce a TAP output, a Test Anything Protocol. This output can be very helpful when writing new tests for future features for can-merge. The TAP output produces a more thorough response to help diagnose breakages. You can read more about it here.

Screen Shot 2022-03-17 at 1 11 41 PM

You may pipe in tap-spec, in order to pretty up the output, and format the TAP output like Mocha's spec reporter in several ways:

npx tape test/filterPullRequest.js | node_modules/.bin/tap-spec
npx tape test/filterPullRequest.js | npx tap-spec

Screen Shot 2022-03-17 at 1 10 59 PM

If tap-spec is not your thing, there is also faucet a npm dependency, found here. It is a human-readable TAP summarizer.

To get the faucet command, do:

npm install -g faucet

Then just run the test file as above, with faucet piped in:

npx tape test/evaluateCommitStatus.js | faucet

Screen Shot 2022-03-17 at 3 04 14 PM

Or give faucet a command of files:

faucet test/evaluateCommitStatus.js

Screen Shot 2022-03-17 at 3 04 43 PM

Code of Conduct

Code of Conduct

Where can I ask for help?

If you have any questions, please contact @LJHarb.