🥳 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.
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.
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.
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
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
Or give faucet
a command of files:
faucet test/evaluateCommitStatus.js
If you have any questions, please contact @LJHarb.