Skip to content

Commit

Permalink
wip: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgr committed Jul 8, 2024
1 parent 30690ca commit 00078dd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ const submitter = context.actor;
const submissionDate = context.event.issue.created_at;

const template_fields = context.event.issue.body.split("### ").slice(1);
const addChainPR = (fields) => {
const chainId = fields[1].split("\n\n")[1];
const note = fields[2].split("\n\n").slice(1,-1);
const threatLevel=fields[3].split("\n\n")[1][0];
console.log( {chainId,note,threatLevel});
}
if (context.event.issue.title.startsWith("[Chain-add]: ")) {
addChainPR(template_fields);
}
/*
if (context.event.issue.title.startsWith("[Site-add]: ")) {
addSitePR(template_fields);
}
if (context.event.issue.title.startsWith("[Asset-add]: ")) {
addAssetPR(template_fields);
}
const addChainPR = (fields) => {
const chainId = fields[1].split("\n\n")[1];
const note = fields[2].split("\n\n").slice(1,-1);
const threatLevel=fields[3].split("\n\n")[1][0];
console.log( {chainId,note,threatLevel});
}
*/

0 comments on commit 00078dd

Please sign in to comment.