Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Clubhouse from 'clubhouse-lib';
import { loadConfig } from './configure';
const config = loadConfig();
if (!config) {
console.error('Please run install to configure API access');
process.exit(1);
}
const client = Clubhouse.create(config.token);
export default client;
export function createStory(token: string, story: IStory): Promise {
const client = require('clubhouse-lib').create(token);
const reqObj = pick(story, ['name', 'description', 'story_type', 'epic_id', 'project_id', 'labels']);
if (!isNullOrUndefined(story.owner_ids)) {
reqObj.owner_ids = Array.isArray(story.owner_ids) ? story.owner_ids : [story.owner_ids];
}
return client.createStory(reqObj);
}
import Clubhouse from 'clubhouse-lib';
import { loadConfig } from './configure';
const config = loadConfig();
const client = Clubhouse.create(config.token);
export default client;