diff --git a/.github/ISSUE_TEMPLATE/add-new-config.yml b/.github/ISSUE_TEMPLATE/add-new-config.yml index 3ff45118..363383fa 100644 --- a/.github/ISSUE_TEMPLATE/add-new-config.yml +++ b/.github/ISSUE_TEMPLATE/add-new-config.yml @@ -506,6 +506,13 @@ body: - "false" validations: required: true +- type: textarea + id: admin_access + attributes: + label: Admin Access Emails + description: Please enter a comman separated list of emails to which we will grant access to the admin dashboard. This will usually be a relatively short list. + validations: + required: true # - type: dropdown # id: token_generate # attributes: @@ -530,7 +537,7 @@ body: value: "## Detailed Survey and Reminder Customization" - type: markdown attributes: - value: "If you are NOT electing to have custom trip surveys or a custom reminder schecme, you can skip this section and submit the form." + value: "If you are NOT electing to have custom trip surveys or a custom reminder scheme, you can skip this section and submit the form." - type: textarea id: reminderSchemes attributes: @@ -549,4 +556,4 @@ body: id: trip_survey_path attributes: label: Custom Trip Survey - description: Please add a path to a trip survey, something like "https://raw.githubusercontent.com/sebastianbarry/nrel-openpath-deploy-configs/surveys-info-and-surveys-data/survey-resources/data-json/trip-end-survey-multiple-select.json" + description: Please add a path to a trip survey, something like "sample_trip-end" in "https://github.com/e-mission/nrel-openpath-deploy-configs/tree/main/survey_resources/samples" diff --git a/.github/actions/convertIssue/action.yml b/.github/actions/convertIssue/action.yml index 3a66d435..ed442768 100644 --- a/.github/actions/convertIssue/action.yml +++ b/.github/actions/convertIssue/action.yml @@ -1,4 +1,5 @@ # this action is based on the action by zachleat on github (github-issue-to-json-file) +# https://github.com/zachleat/github-issue-to-json-file/blob/main/action.yml name: New Config Issue to JSON description: Convert GitHub issues for new configs to JSON data files. diff --git a/.github/actions/convertIssue/issue-to-json.js b/.github/actions/convertIssue/issue-to-json.js index e67e798e..3c97b7bd 100644 --- a/.github/actions/convertIssue/issue-to-json.js +++ b/.github/actions/convertIssue/issue-to-json.js @@ -1,3 +1,5 @@ +// adapted from https://github.com/zachleat/github-issue-to-json-file/blob/main/issue-to-json.js + import { writeFile, mkdir } from "node:fs/promises"; import path from "node:path"; diff --git a/.github/actions/convertIssue/parse-issue-body.js b/.github/actions/convertIssue/parse-issue-body.js index 6a272392..117b3a2c 100644 --- a/.github/actions/convertIssue/parse-issue-body.js +++ b/.github/actions/convertIssue/parse-issue-body.js @@ -1,3 +1,5 @@ +//adapted from https://github.com/zachleat/github-issue-to-json-file/blob/main/parse-issue-body.js + import { readFile } from "node:fs/promises"; import { setFailed } from "@actions/core"; import yaml from "js-yaml"; @@ -350,6 +352,9 @@ export async function parseIssueBody(githubIssueTemplateFile, body) { ); } + //list of administrator emails + configObject['admin_dashboard'].admin_access = combinedObject.admin_access.split(','); + //TODO: add handling for custom reminder schemes console.log(configObject); diff --git a/.github/workflows/issue-to-json.yml b/.github/workflows/issue-to-json.yml index 2bdca1ac..d0c737d1 100644 --- a/.github/workflows/issue-to-json.yml +++ b/.github/workflows/issue-to-json.yml @@ -37,7 +37,7 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add * + git add configs/ git commit -m "Creating or updating file from form in issue #${{ env.IssueNumber }}" - name: Create Pull Request id: cpr @@ -54,4 +54,4 @@ jobs: - Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request - draft: false \ No newline at end of file + draft: false diff --git a/survey_resources/samples/sample_trip-end_mulit-select.xml b/survey_resources/samples/sample_trip-end_mulit-select.xml new file mode 100644 index 00000000..23886bf8 --- /dev/null +++ b/survey_resources/samples/sample_trip-end_mulit-select.xml @@ -0,0 +1,253 @@ + + + + Trip confirm survey + + + + + + + + 1 + 0 + 1 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Including yourself + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + 7 + + + + 8 + + + + + + + 0 + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + 997 + + + + + (If none, put 0 ) + + + + (If none, put 0) + + + + + + diff --git a/survey_resources/samples/sample_trip-end_multi-select.json b/survey_resources/samples/sample_trip-end_multi-select.json new file mode 100644 index 00000000..4ad256db --- /dev/null +++ b/survey_resources/samples/sample_trip-end_multi-select.json @@ -0,0 +1 @@ +{"languageMap":{},"form":"
\n

Trip-end survey

\n \n \n
What were the purposes of this trip?*More than one purpose can be selected.\n
A trip can either be valid or not valid, it cannot be both.This field is required
\n
What were the modes of transport used in this trip?*More than one transport mode can be selected.\n
This field is required
\n
Total people in trip party*Including yourself\n
This field is required
\n
Non-household member(s) on trip*\n
This field is required
\n
Vehicle trip: Parking location*\n
This field is required
\n \n \n \n \n \n
","model":"\n \n \n \n \n \n 1\n 0\n 1\n 0\n 0\n \n \n \n \n \n \n ","transformerVersion":"1.31.0"} \ No newline at end of file