Open
Description
moving from gr2m/octokit-webhooks.js-legacy#8 @rtsao, @JasonEtco
Per probot/probot#316 (comment), for testing probot apps, it would be ideal to have a node-github
-like API to programmatically generate webhook fixtures, for example something like:
let robot = /* ... */
let github = new MockGitHub();
let repo = github.mocks.repo({
org: 'test-org',
name: 'test-repo'
});
robot.auth = () => Promise.resolve(github);
let webhook = github.issues.edited(
repo.issue({
body: 'new issue body'
})
);
await robot.recieve(webhook);
/* ... assertions ... */