forked from ubiquity/devpool-directory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
30 lines (26 loc) · 773 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Labels } from "./src/directory/directory";
import { ensureLabelExists } from "./src/directory/label-utils";
import { gitPush } from "./src/git";
import { main } from "./src/main";
/**
* Main function
* TODO: retry on rate limit error
* TODO: handle project deletion
*/
async function runMainAndPush() {
try {
await ensureLabelExists(Labels.UNAVAILABLE, "ededed", "Indicates the issue is currently assigned and unavailable.");
await main();
} catch (error) {
console.error("Error in main execution:", error);
}
try {
await gitPush();
} catch (error) {
console.error("Error during git push:", error);
}
}
runMainAndPush().catch((error) => {
console.error("Unhandled error in runMainAndPush:", error);
process.exit(1);
});