docker-machine start default
eval "$(docker-machine env default)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 'labeled' event handler | |
* @param {Object} payload Github event payload | |
*/ | |
const { query } = require('../graphql') | |
const { | |
graphqlClient, | |
addProjectCard, | |
moveProjectCard, | |
baseVariables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { json, send, text } = require('micro') | |
const micro = require('micro') | |
const config = require('../config') | |
const actions = require('../actions') | |
const { signRequestBody } = require('../lib/crypto') | |
/** | |
* Main request handler | |
* @param {Object} req HTTP request object | |
* @param {Object} res HTTP response object | |
* @returns {Object} Updated server response object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto') | |
/** | |
* Sign request body using secret and HTTP request body | |
* @param {string} key Secret key | |
* @param {body} body HTTP request body | |
* @returns {string} Generate hash code | |
*/ | |
function signRequestBody (key, body) { | |
return `sha1=${crypto.createHmac('sha1', key).update(body, 'utf-8').digest('hex')}` | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const async = require('async') | |
const Github = require('github-api') | |
const { GraphQLClient } = require('graphql-request') | |
const { query, mutation } = require('../graphql') | |
const config = require('../config') | |
const { token, repo, owner } = config.github | |
const issues = new Github({ token }).getIssues(`${owner}/${repo}`) | |
const graphqlClient = new GraphQLClient('https://api.github.com/graphql', { | |
headers: { Authorization: `bearer ${token}`, } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createProxy = require('micro-proxy') | |
const services = require('./services') | |
const {port} = require('./config').server | |
const server = createProxy(Object.values(services) | |
.map(service => service[process.env.NODE_ENV])) | |
server.listen(port, (err) => { | |
if (err) throw err | |
console.log(`> Ready on http://localhost:${port}`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { json, send } = require('micro') | |
module.exports = async (req, res) => { | |
return send(res, 200, req.url) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file |