Skip to content

Commit

Permalink
fix: stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BeanieMen committed Feb 17, 2024
1 parent f1bf701 commit 8a0dc70
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ async function main() {
const devpoolIssue = getIssueByLabel(devpoolIssues, `id: ${projectIssue.node_id}`);
if (devpoolIssue) {
if (projectIssue.state == "closed") {
if (twitterMap[projectIssue.node_id]) {
await twitter.deleteTweet(twitterMap[projectIssue.node_id]);
delete twitterMap[projectIssue.node_id];
if (twitterMap[devpoolIssue.node_id]) {
await twitter.deleteTweet(twitterMap[devpoolIssue.node_id]);
delete twitterMap[devpoolIssue.node_id];
console.log(`Successfully deleted tweet with id ${twitterMap[devpoolIssue.node_id]}`);
await writeFile("./twitterMap.json", JSON.stringify(twitterMap));
}
}
Expand Down

0 comments on commit 8a0dc70

Please sign in to comment.