feat(github): add new watcher trigger

This commit is contained in:
Ali BARIN
2022-10-20 22:50:08 +02:00
parent 120a4c2b07
commit d2e4f0d143
2 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
import defineTrigger from '../../../../helpers/define-trigger';
import newWatchers from './new-watchers';
export default defineTrigger({
name: 'New watchers',
key: 'newWatchers',
pollInterval: 15,
dedupeStrategy: 'unique',
description: 'Triggers when a user watches a repository',
substeps: [
{
key: 'chooseConnection',
name: 'Choose connection'
},
{
key: 'chooseTrigger',
name: 'Set up a trigger',
arguments: [
{
label: 'Repo',
key: 'repo',
type: 'dropdown',
required: true,
variables: false,
source: {
type: 'query',
name: 'getData',
arguments: [
{
name: 'key',
value: 'listRepos'
}
]
}
},
]
},
{
key: 'testStep',
name: 'Test trigger'
}
],
async run($) {
return await newWatchers($);
},
});