Skip to content

Instantly share code, notes, and snippets.

@ahallora
Created March 20, 2026 15:34
Show Gist options
  • Select an option

  • Save ahallora/2812720844b599620cadac55aba05558 to your computer and use it in GitHub Desktop.

Select an option

Save ahallora/2812720844b599620cadac55aba05558 to your computer and use it in GitHub Desktop.
Produce PR summary for AI
(() => {
const titles =
Array.from(new Set([...document.querySelectorAll(".js-timeline-item a[title]")]
.map(x => x.title.trim())
.map(x => `- ${x.startsWith("Merge pull") ? x.split("\n").pop() : x}`)));
const prompt = `Summarize this list of commits made on this PR, in a
SIMPLE SHORTFORM LIST using the conventional commit structure
for defining what is being commited.
Ignore small stuff unimportant stuff like tweaking tests,
adjusting imports, fixing flaky tests etc. - this summary
is for the entire team to understand what we're pushing.
Keep it short and sweet:\n`
.replace(/\s+/g, " ").trim();
const text = [prompt, titles].join("\n");
window.prompt("Copy/Paste into LLM", text);
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment