1
0
Fork 0
cautious-journey/src/sync.ts

32 lines
721 B
TypeScript
Raw Normal View History

import { ConfigData } from './config';
import { Remote } from './remote';
// TODO: turn this back on/remove the disable pragma
/* eslint-disable no-console */
export interface SyncOptions {
config: ConfigData;
project: string;
remote: Remote;
}
export async function syncIssues(options: SyncOptions): Promise<unknown> {
const issues = await options.remote.listIssues();
for (const issue of issues) {
console.log('issue:', issue.name, issue.labels);
}
return undefined;
}
export async function syncLabels(options: SyncOptions): Promise<unknown> {
const labels = await options.remote.listLabels();
for (const label of labels) {
console.log('label:', label.name);
}
return undefined;
}