Skip to content

Commit

Permalink
Merge pull request #45 from adeyinkaoresanya/adeyinka-contributions-b…
Browse files Browse the repository at this point in the history
…adgingV4

Badging V4.0 Add three metrics to the Application
  • Loading branch information
adeyinkaoresanya committed May 16, 2024
2 parents dc9d07b + 829de1a commit 19d6443
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ DB_HOST= # default is 'localhost'
DB_NAME=
DB_USER=
DB_PASSWORD=

# smeeClient URL for testing

SMEE_CLIENT_URL=
52 changes: 48 additions & 4 deletions event_badging/logic/assignChecklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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";
/******************************************************************/
}
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit 19d6443

Please sign in to comment.