A Tampermonkey userscript that adds smart autocomplete for bots and bot commands directly inside GitHub PR and issue comment boxes.
When writing comments on GitHub, this script enhances any comment textarea with two triggers:
@@— opens a bot picker dropdown listing all configured bots. Select one to insert@botname./at the start of a line — opens a searchable command dropdown. Typing more characters (e.g./rev) filters the list in real-time. Selecting a command inserts the full@botname command-textstring.
A Settings UI (accessible from the Tampermonkey browser menu) lets you add, edit, and remove bots and their commands without touching any code.
Designed to work with the github-listener backend, which listens for specific bot trigger phrases in PR/issue comments. Instead of remembering exact command strings like @edgeney review the code, you just type /rev and pick from the dropdown.
- Install Tampermonkey in your browser.
- Build the userscript:
bun install bun run build
- Open
dist/github-bot-selector.user.jsin your browser — Tampermonkey will prompt you to install it.
bun install # install dependencies
bun test # run tests
bun run build # bundle to dist/github-bot-selector.user.jssrc/
main.js # entry point, wires all modules
storage.js # bot/command config persistence via GM_setValue/GM_getValue
autocomplete.js # trigger detection, dropdown rendering, key navigation
github.js # textarea detection, MutationObserver for SPA navigation
ui.js # settings modal, bot/command CRUD forms
tests/
*.test.js # bun test (Happy DOM)
docs/
design.md # full design doc
import-export.md # import/export feature design
| Command | Inserted text |
|---|---|
/review |
@edgeney review the code |
/triage |
@edgeney triage |
/pm |
@edgeney pm |