Prompt file imported from accesswatch/Learning-Room (
.github/prompts/react.prompt.md). Fill in{{target}}before use. Copyright stays with the author.
Add an emoji reaction to an issue, PR, or specific comment.
{{target}}
Behavior
Parse the target to determine:
-
What to react to:
- An issue --> "like #42", "thumbs up issue #42"
- A PR --> "rocket PR #15", "thumbs up PR owner/repo#15"
- A specific comment --> "heart Alice's comment on #42", "like comment 3 on #42"
- The latest comment --> "thumbs up the last comment on #42"
-
Which reaction:
- Map natural language to GitHub reaction types:
- "like", "agree", "thumbs up", "+1" -->
+1 - "disagree", "thumbs down", "-1" -->
-1 - "love", "heart" -->
heart - "celebrate", "hooray", "tada" -->
hooray - "ship it", "rocket", "launch" -->
rocket - "looking", "eyes", "watching" -->
eyes - "funny", "laugh", "lol" -->
laugh - "confused", "huh", "what" -->
confused
- "like", "agree", "thumbs up", "+1" -->
- Map natural language to GitHub reaction types:
Steps
- Parse the target reference to extract owner, repo, number, and optionally comment identifier.
- If targeting an issue or PR body:
- Fetch current reactions to show what's already there.
- Add the reaction.
- Confirm: "Added thumbs-up to {repo}#{number}. Current reactions: +1: 6, heart: 2"
- If targeting a specific comment:
- Fetch all comments and display a numbered list if the user didn't specify which one.
- Add the reaction to the identified comment.
- Confirm: "Added heart to @alice's comment on {repo}#{number}."
- If the user says "react to #42" without specifying which reaction, show the available reactions and ask.
Never modify issue/PR state -- reactions only.