This file contains 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 PercyScript = require('@percy/script'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const directories = [ | |
path.resolve(__dirname, '../src/components/elements'), | |
path.resolve(__dirname, '../src/components/patterns'), | |
path.resolve(__dirname, '../src/components/templates'), | |
]; |
This file contains 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 PercyScript = require("@percy/script"); | |
const fs = require("fs"); | |
const path = require("path"); | |
const directories = [ | |
{ | |
type: "Element", | |
path: path.resolve(__dirname, "src/components/elements") | |
}, | |
{ |
This file contains 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 https = require('https'); | |
const AUTHORIZATION = ''; // base 64 of user:password | |
const BITBUCKET_USER = ''; // either the user or the org that owns the repo | |
const PERCY_USER = ''; // the name of your percy user or org | |
exports.handler = (event, context, callback) => { | |
/** | |
We need to post to a URL like this: | |
https://api.bitbucket.org/2.0/repositories/<user>/<repo>/commit/<hash>/statuses/build |