File challenge reports against the backend instead of GitHub - #2917
Merged
Merged
Conversation
Reporting a challenge opened an issue in a public GitHub repository, using a GitHub write token that had to be shipped to the browser, and decided whether a challenge had been reported by searching that repo. The backend stores reports itself now, so none of that is needed: POST the report, and let the server record it, post the challenge comment that tells the owner, and hand it to an admin to triage. Reports are readable by anyone, so the flag control no longer hides behind GitHub env vars. A challenge with an open report shows as reported to every reader, logged in or not, and clicking through lists the reports with their reporter, date, body and outcome. Adds a Reports tab to super admin, since the triage that used to happen in the GitHub issue tracker now has nowhere else to go: filter by status, limit to challenges that are still active, and mark a report actioned or dismissed with an optional note. Drops REACT_APP_GITHUB_ISSUES_API_TOKEN/_OWNER/_REPO, which no longer have a reader, and the translations of the modal subtitle that promise a GitHub issue will be created. Requires the backend's challenge report endpoints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reporting a challenge opened an issue in a public GitHub repository, using a GitHub write token that had to be shipped to the browser, and decided whether a challenge had been reported by searching that repo. The backend stores reports itself now, so none of that is needed: POST the report, and let the server record it, post the challenge comment that tells the owner, and hand it to an admin to triage.
Reports are readable by anyone, so the flag control no longer hides behind GitHub env vars. A challenge with an open report shows as reported to every reader, logged in or not, and clicking through lists the reports with their reporter, date, body and outcome.
Adds a Reports tab to super admin, since the triage that used to happen in the GitHub issue tracker now has nowhere else to go: filter by status, limit to challenges that are still active, and mark a report actioned or dismissed with an optional note.
Drops REACT_APP_GITHUB_ISSUES_API_TOKEN/_OWNER/_REPO, which no longer have a reader, and the translations of the modal subtitle that promise a GitHub issue will be created.
Requires the backend's challenge report endpoints.