Hasty Briefsbeta

Bilingual

Show HN: A GitHub Action that quizzes you on a pull request

9 months ago
  • #AI
  • #GitHub
  • #CodeReview
  • AI Agents are increasingly writing more code, raising the need for human understanding of their output.
  • PR Quiz is a GitHub Action that generates quizzes based on pull requests to test human reviewers' understanding of AI-generated code.
  • To use PR Quiz, you need an OpenAI API Key and an ngrok auth token (free tier is sufficient).
  • Setup involves adding these tokens as action secrets in your GitHub repository and placing a `quiz.yml` file in the `.github/workflows` directory.
  • The `quiz.yml` file specifies the workflow, including triggers on pull request approvals and necessary permissions.
  • PR Quiz runs a temporary webserver in the GitHub Actions runner, using ngrok for public access, ensuring code privacy.
  • Configuration options include model selection, lines changed threshold, time limits, max attempts, and file exclusions.
  • The action can be modified to work with self-hosted models, offering flexibility in model usage.