Pull request description generator prompt

Paste a diff and get a clear PR description with summary, motivation, testing notes, and what reviewers should focus on.

بواسطة ‪Ahmed Eid‬‏0 نسخة

متى تستخدم هذا البرومبت

  • Right before opening a pull request.
  • When a PR touches several files and needs a clear summary for reviewers.
  • When your team requires a consistent PR template to be filled in.

نص البرومبت

Write a pull request description for this change: {{focus}}. Include a summary, why it's needed, how it was tested, and any risks reviewers should focus on.

{{CLIPBOARD}}
{{focus}}{{CLIPBOARD}}

الكتلة {{CLIPBOARD}} تُستبدل تلقائياً بما نسخته قبل الضغط على «نسخ».

كيف تستخدمه

  1. انسخ البرومبت بالزر أو املأ المتغيرات أولاً.
  2. الصقه في ChatGPT أو Claude أو Gemini.
  3. عدّل النتيجة أو أعد الطلب بتغيير المتغيرات.

مثال على النتيجة

## Summary
Adds rate limiting to the /api/login endpoint to prevent brute-force attempts.

## Why
Security review flagged unlimited login attempts as a risk.

## Testing
Added unit tests for the rate limiter; manually verified lockout after 5 failed attempts.

## Reviewer focus
Please check the Redis key expiry logic in rateLimiter.ts.

نصائح للاستخدام

  • Paste the actual diff, not just a description, so the summary reflects real changes.
  • If your repo has a PR template, paste it too and ask the output to follow that structure.
  • Call out any risky or unfinished parts explicitly so reviewers don't miss them.

أسئلة شائعة

Can it match my team's existing PR template?
Yes, paste your template alongside the diff and ask it to fill in each section.
Will it write test cases too?
It summarizes testing you describe or that's visible in the diff; use a separate unit test prompt to generate new tests.

برومبتات ذات صلة

Generate a GraphQL Schema from a Description

Describe your data and operations in plain English and get a complete, documented GraphQL schema.

Design a GraphQL schema (types, queries, mutations) for: {{focus}}. Use {{language}} conventions and include field-level descriptions. {{CLIPBOARD}}

{{focus}}{{language}}{{CLIPBOARD}}

Generate Realistic Mock Data for Testing

Get realistic, varied mock data, including edge cases, matched to your schema, ready to seed a test database.

Generate {{focus}} realistic mock/test data records in {{language}} format for this schema or type, with varied and edge-case values. {{CLIPBOARD}}

{{focus}}{{language}}{{CLIPBOARD}}

Explain What This Legacy Code Actually Does

Paste unfamiliar or legacy code and get a plain-language walkthrough, with dead code and possible bugs flagged.

Walk through this {{language}} code line by line and explain what it does, in plain language. Flag anything that looks like dead code, a workaround, or a potential bug. {{CLIPBOARD}}

{{language}}{{CLIPBOARD}}

Generate a Dockerfile for Your App

Get a secure, optimized Dockerfile tailored to your language and framework, ready to build and run.

Write a production-ready Dockerfile for a {{language}} app using {{framework}}. Use multi-stage builds where useful, minimize image size, and run as a non-root user. Notes: {{focus}}. {{CLIPBOARD}}

{{language}}{{framework}}{{focus}}{{CLIPBOARD}}
المزيد في برمجة