Closed edwinjue closed 6 months ago
@edwinjue A potential solution we can employ is to trigger a Github Action whenever a user makes an Issue request. We'll need someone with pull request access to make a access token since there's no way to create an issue without providing credentials .
Can you create a Personal Access Token and add it to Github secrets so I can use for testing? I don't have rights to do this on the 311 repo.
@alexlaw528 Thank you so much for being so proactive on this! I will take a look when I have some time in the evening. In the meanwhile, feel free to fork our main branch into your own personal github repo to get started. Once we have something working on your own personal repo, we can work together to port it over to 311-data. I really appreciate it and will follow up later!
@traycn 's suggestions (she will expand on these in her work)
Availability: 2/2 - 2/5: 4AM - 9AM PT
@traycn thank you so much for picking up this issue! Just a gentle reminder to move this issue to 'in progress' on the Project Board as soon as you assign yourself so that this issue will no longer be on the 'priortized backlog' for other devs to pick up. Thanks again!
Add 2 events after the existing form is submitted. For reference to the data we are using, the values we are collecting on the forms submit are below.
// Contact Form field values:
{
FirstName,
LastName,
Email,
Association (optional),
Message
}
Create a Github Issue using Octokit/Core.js. Documentation for the Create an issue POST here.
// Octokit - Create a Github Issue POST
{
owner: 'hackforla',
repo: '311-data',
title: 'Contact Form - {FirstName, LastName Association}',
body: '{FirstName, ` `, LastName,` `, Association} <br>
Email - {Email} <br>
Message - {Message}
',
assignees: [
'[insert default assignee here]'
],
milestone: [insert default milestone here],
labels: [
'bug'
],
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
}
On success trigger to send an email. Refer to Event 2.
Documentation for the sendForm() function here.
Loc: 311-data.components.contact.ContactForm.jsx
Contact Form field values
and Email template values
.-- Let me know your thoughts on this proposal @ryanfchase @edwinjue
Created new issue for the Spike item: https://github.com/hackforla/311-data/issues/1682
Overview
We need to fix entire workflow from when submit button gets clicked on the contact form to having the submission appear in a github issue, so that we can know when to process requests.
Action Items
Resources/Instructions
Original code locations