Milestone 0: import zappier billing, Verae middleware, and Zapier research
Compose-ready workspace: packages/zappier (rate card, portal, Stripe), packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier (CLI app), vendor/zapier-platform, and research/zapier vendor corpus. Gate 0 structure checks pass. Product code and research are not yet wired.
This commit is contained in:
commit
b4150c8250
1364 changed files with 6814366 additions and 0 deletions
59
vendor/zapier-platform/example-apps/github/triggers/issue.js
vendored
Normal file
59
vendor/zapier-platform/example-apps/github/triggers/issue.js
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
const sample = require('../samples/sample_issue');
|
||||
|
||||
const triggerIssue = (z, bundle) => {
|
||||
const responsePromise = z.request({
|
||||
method: 'GET',
|
||||
url: `https://api.github.com/repos/${bundle.inputData.repo}/issues`,
|
||||
params: {
|
||||
filter: bundle.inputData.filter,
|
||||
state: bundle.inputData.state,
|
||||
sort: 'updated',
|
||||
direction: 'desc',
|
||||
},
|
||||
});
|
||||
return responsePromise.then((response) => response.data);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
key: 'issue',
|
||||
noun: 'Issue',
|
||||
|
||||
display: {
|
||||
label: 'New Issue',
|
||||
description: 'Triggers on a new issue.',
|
||||
},
|
||||
|
||||
operation: {
|
||||
inputFields: [
|
||||
{
|
||||
key: 'repo',
|
||||
label: 'Repo',
|
||||
required: true,
|
||||
dynamic: 'repo.full_name.full_name',
|
||||
},
|
||||
{
|
||||
key: 'filter',
|
||||
required: false,
|
||||
label: 'Filter',
|
||||
choices: {
|
||||
assigned: 'assigned',
|
||||
created: 'created',
|
||||
mentioned: 'mentioned',
|
||||
subscribed: 'subscribed',
|
||||
all: 'all',
|
||||
},
|
||||
helpText: 'Default is "assigned"',
|
||||
},
|
||||
{
|
||||
key: 'state',
|
||||
required: false,
|
||||
label: 'State',
|
||||
choices: { open: 'open', closed: 'closed', all: 'all' },
|
||||
helpText: 'Default is "open"',
|
||||
},
|
||||
],
|
||||
perform: triggerIssue,
|
||||
|
||||
sample: sample,
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue