Skip to content

rhoninl/GithubBotSelector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GithubBotSelector

A Tampermonkey userscript that adds smart autocomplete for bots and bot commands directly inside GitHub PR and issue comment boxes.

What it does

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-text string.

A Settings UI (accessible from the Tampermonkey browser menu) lets you add, edit, and remove bots and their commands without touching any code.

Use case

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.

Installation

  1. Install Tampermonkey in your browser.
  2. Build the userscript:
    bun install
    bun run build
  3. Open dist/github-bot-selector.user.js in your browser — Tampermonkey will prompt you to install it.

Development

bun install       # install dependencies
bun test          # run tests
bun run build     # bundle to dist/github-bot-selector.user.js

Project Structure

src/
  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

Default Bot (edgeney)

Command Inserted text
/review @edgeney review the code
/triage @edgeney triage
/pm @edgeney pm

About

Tampermonkey userscript that adds smart bot autocomplete (@@ and / triggers) to GitHub PR and issue comment boxes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors