fix: add error handling code
This commit is contained in:
@@ -10,7 +10,7 @@ import History from './lib/history.mjs';
|
|||||||
// load env vars from .env file
|
// load env vars from .env file
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
export default async function() {
|
async function ghActionBot() {
|
||||||
// parse repo name from cli and create repo instance
|
// parse repo name from cli and create repo instance
|
||||||
const repo = createRepo(process.argv.splice(2)[0]);
|
const repo = createRepo(process.argv.splice(2)[0]);
|
||||||
const {
|
const {
|
||||||
@@ -64,19 +64,11 @@ export default async function() {
|
|||||||
await deleteComment(repo, comment.id);
|
await deleteComment(repo, comment.id);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
}
|
||||||
/*
|
|
||||||
|
export default function() {
|
||||||
TODO:
|
return ghActionBot().catch(err => {
|
||||||
|
console.error(err);
|
||||||
- [x] keep track of seen comment ids, only process new ones
|
return process.exit(1);
|
||||||
- [x] check the pr's status and only retest if no longer "Pending"
|
});
|
||||||
- [x] add a retest comment
|
|
||||||
- POST /repos/:owner/:repo/issues/:number/comments
|
|
||||||
- [x] delete the retest comment
|
|
||||||
- [ ] delete the build comment
|
|
||||||
- [ ] delete ALL build failure comments
|
|
||||||
- DELETE /repos/:owner/:repo/issues/comments/:comment_id
|
|
||||||
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user