Skip to content

Instantly share code, notes, and snippets.

View matt-ball's full-sized avatar

Matt Ball matt-ball

View GitHub Profile
@matt-ball
matt-ball / newman-async.js
Created September 23, 2019 23:18
Run Newman Asynchronously Cleanly
const newman = require('newman')
const config = [{
collection: 'collection_one.json',
environment: 'env_one.json'
}, {
collection: 'collection_two.json',
environment: 'env_two.json'
}]
@matt-ball
matt-ball / pre-push
Created August 9, 2019 00:16
Postman x git push hook
#!/usr/bin/env node
const fs = require('fs')
const path = require('path')
const https = require('https')
const childProcess = require('child_process')
const cwd = process.cwd()
const cfg = require(path.resolve(cwd, 'hooks/config.js'))
const options = {
@matt-ball
matt-ball / post-checkout
Created August 9, 2019 00:05
Postman x git checkout hook
#!/usr/bin/env node
const fs = require('fs')
const path = require('path')
const cwd = process.cwd()
const cfg = require(path.resolve(cwd, 'hooks/config.js'))
const isForce = process.argv[2] === 'force'
const prevHead = process.argv[2]
const newHead = process.argv[3]
const isBranchCheckout = process.argv[4] === '1'