-
Notifications
You must be signed in to change notification settings - Fork 197
feat: add hotline reporting feature with modal and API endpoint #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add hotline reporting feature with modal and API endpoint #464
Conversation
332c64d to
1991717
Compare
|
@Justin322322 Can I have an update on this? Does it still work on your end? I already used a GITHUB_TOKEN for it and gave me a "Network error. Please try again or report directly on GitHub." |
|
Also, can you provide the steps on how I can test this? Kind of confused where to go after inputting the github token |
|
Changes:
Technical Details:
Testing Notes:
How to test after deployment (staging server):
Hotline Email Reporting FlowHow It Works (Simple)flowchart LR
A[User fills form] --> B[Submit to API]
B --> C[API validates data]
C --> D[Build email]
D --> E[Send via MailChannels]
E --> F[Email delivered]
style A fill:#e1f5ff
style F fill:#ffebee
Complete FlowsequenceDiagram
User->>Frontend: Fill form & submit
Frontend->>API: POST /api/report-hotline
API->>API: Validate data
API->>MailChannels: Send email
MailChannels->>Email: Deliver to bugs email
API->>Frontend: Success response
Frontend->>User: Show success message
What Gets SentEmail Details:
Required Fields:
Optional Fields:
|
|
I'll take note of these after deployment |
cabc6f0 to
f556c5f
Compare
|
In my opinion, the reports should still go under GitHub issues. Some volunteers may be willing to update outdated hotlines if they are visible in GitHub issues. Just sending it as email would only make it visible to us maintainers which is not really ideal. Additionally, I propose just sending it in GitHub issues and mark it with a certain label like |
|
I've updated the feature based on your feedback. Reports now go to GitHub issues instead of email so volunteers can see and help out. What changed:
Setup (you'll need to do this once):
Testing it out:
The reporter's email (if they provide one) will be in an HTML comment in the issue - public can't see it but you can view it in the markdown source if you need to follow up with them. |
4f3d7d1 to
739f8e4
Compare
- Remove GitHub API integration and token requirement - Implement email-based reporting using MailChannels - Send reports to [email protected] - Make reporter email optional for anonymous reporting - Simplify UI by removing 'Open in GitHub' button - Add fallback console logging if email fails - Update error messages to be more user-friendly
- Create public GitHub issues for transparency and volunteer visibility - Users don't need GitHub accounts - API creates issues on their behalf - Issues labeled with: hotline, data-update, community-report - Reporter email hidden in HTML comment (only maintainers can see) - Users receive link to view their submitted issue - Improved error handling and user feedback
739f8e4 to
28e2edc
Compare
Add Hotline Reporting Feature
Adds a reporting system for users to submit outdated hotline information directly from the Hotlines page. Reports are automatically created as GitHub issues.
What's New
/api/report-hotlineendpoint that creates GitHub issues via APIScreenshots
Setup Required
Add
GITHUB_TOKENenvironment variable withreposcope to enable issue creation.