diff --git a/.env.example b/.env.example index 0b10e4b..4d31704 100644 --- a/.env.example +++ b/.env.example @@ -30,3 +30,7 @@ DB_HOST= # default is 'localhost' DB_NAME= DB_USER= DB_PASSWORD= + +# smeeClient URL for testing + +SMEE_CLIENT_URL= diff --git a/event_badging/logic/assignChecklist.js b/event_badging/logic/assignChecklist.js index 50fd2bf..0901805 100644 --- a/event_badging/logic/assignChecklist.js +++ b/event_badging/logic/assignChecklist.js @@ -76,9 +76,20 @@ const assignChecklist = async (octokit, payload) => { ) + "\n" + "\n" + - body.slice(body.indexOf("## Diversity Access Tickets")) + + body.slice( + body.indexOf("## Diversity Access Tickets"), + body.indexOf("## Event Accessibility") + ) + + "\n" + + checklist.slice( + checklist.indexOf("### Diversity Access tickets"), + checklist.indexOf("### Event Accessibility") + ) + + "\n" + "\n" + - checklist.slice(checklist.indexOf("### Diversity Access tickets")) + + body.slice(body.indexOf("## Event Accessibility")) + + "\n" + + checklist.slice(checklist.indexOf("### Event Accessibility")) + "\n"; /******************************************************************/ } else { @@ -151,9 +162,42 @@ const assignChecklist = async (octokit, payload) => { ) + "\n" + "\n" + - body.slice(body.indexOf("## Family Friendliness")) + + body.slice( + body.indexOf("## Family Friendliness"), + body.indexOf("## Event Accessibility") + ) + + "\n" + + checklist.slice( + checklist.indexOf("### Family Friendliness"), + checklist.indexOf("### Event Accessibility") + ) + + "\n" + + "\n" + + body.slice( + body.indexOf("## Event Accessibility"), + body.indexOf("## Event Location Inclusivity") + ) + + "\n" + + checklist.slice( + checklist.indexOf("### Event Accessibility"), + checklist.indexOf("### Event Location Inclusivity") + ) + + "\n" + + "\n" + + body.slice( + body.indexOf("## Event Location Inclusivity"), + body.indexOf("## Public Health and Safety") + ) + + "\n" + + checklist.slice( + checklist.indexOf("### Event Location Inclusivity"), + checklist.indexOf("### Public Health and Safety") + ) + + "\n" + + "\n" + + body.slice(body.indexOf("## Public Health and Safety")) + "\n" + - checklist.slice(checklist.indexOf("### Family Friendliness")) + + checklist.slice(checklist.indexOf("### Public Health and Safety")) + "\n"; /******************************************************************/ } diff --git a/index.js b/index.js index b5121d3..42b7ac5 100644 --- a/index.js +++ b/index.js @@ -45,7 +45,7 @@ routes.setupRoutes(app); const SmeeClient = require("smee-client"); if (process.env.NODE_ENV === "development") { const smee = new SmeeClient({ - source: `${process.env.SMEECLIENT_URL}`, + source: `${process.env.SMEE_CLIENT_URL}`, target: `http://localhost:${process.env.PORT}/api/event_badging`, logger: console, });