Skip to content

jimtang2/grok-webhook-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grok-Webhook

Description

This service listens to messages sent from grok-webhook-webext to safely replace files within a git repository branch.

It relies on prompting the LLM to start code blocks with a line in the format:

// webhook$$project_name;file_name;branch_name$$

Setup

  1. Define projects name to path map in config.yml.
  2. Run and configure grok-webhook-webext on browser.
  3. Prompt LLM to insert header line in code blocks with project, file and branch.
  4. Make sure project head branch matches. If not, files won't be replaced.

Example config.yml

port: :8000
projects:
	project_name_1: /path/to/repo-1/
	project_name_2: /path/to/repo-2/

Example Prompt Header

// webhook$$project_name_1;src/index.js;grok$$

function sayHi() {
	console.log("hi")
}

The above prompt response triggers writing to /path/to/repo-1/src/index.js on the grok branch. Note for security, the HEAD branch must be set to grok.

About

Companion service to grok-webhook-webext

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages