Repository navigation
feat: implement opt out flow with api endpoint, web page and exclusion filters (fixes #23) - #57
Closed
evandroribeiro94 wants to merge 1 commit into
Closed
evandroribeiro94 wants to merge 1 commit into
evandroribeiro94 wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the Payroutes OSS Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description
Closes #23.
Implements the complete opt-out workflow allowing project owners and builders to remove their projects or handles from the HackProof index:
Opt-Out Page (
apps/web/src/pages/opt-out.tsx):/opt-outinApp.tsx.project_idwhen navigating from links (/opt-out?project_id=...)./project/*header and site footer.API Endpoint (
POST /api/opt-out):HACKPROOF_OPT_OUT_GITHUB_TOKEN(orOPT_OUT_GITHUB_TOKEN/ fallback).opt-outfor automated triage.Hackathon Model Configuration (
apps/api/src/hackproof/hackathon.py):hidden: list[str] = []field toHackathonPydantic model.hidden_ids()supporting bothrepo:owner/name,owner/name, and account IDs (acct:G...).Exclusion Across the Entire Surface:
queries.py&routes.py):PROJECTS_SQL,CONTRACTS_SQL,WASM_SQL,FAILED_SQL: filtered via parameter$10/$8.STATS_SQL,INTEGRATIONS_SQL,COUNTRIES_SQL: aggregate metrics exclude hidden projects and contributors.GET /api/projects/{id}andGET /api/builders/{address}return404 Not Foundfor hidden entities.fetch_links,fetch_contributors, andfetch_integration_usesreturn empty for hidden projects.export/build.py&export/files.py):HackathonExportJSON or individual project YAML files.chat/tools.py&chat/briefs.py):get_projectandget_builderreturn not found error.query_projects,query_contracts,query_wasm,query_failed, andsummarize_projectsnever include hidden project IDs.Verification
pytest apps/api/tests/test_opt_out.py: 7 passed in 4.95stest_hackathon_hidden_defaults_and_normalizes: PASSEDtest_is_hidden_detection: PASSEDtest_opt_out_endpoint_validates_input: PASSEDtest_opt_out_endpoint_creates_github_issue: PASSEDtest_hidden_id_never_appears_in_api_response: PASSEDtest_hidden_id_never_appears_in_export: PASSEDtest_hidden_id_never_appears_in_chat_tools: PASSEDruff check src/ tests/test_opt_out.py: All checks passed! (0 errors)pnpm build(tsc -b && vite build): Built in 3.29s (0 errors)pnpm oxlint: 0 errorspnpm prettier: All modified files formatted