Skip to content

git-commit-story: add init and Copilot prompt hook - #3098

Merged
Dominic Nguyen (datduyng) merged 7 commits into
mainfrom
domnguyen/git-commit-story-init
Sep 29, 2026
Merged

Dominic Nguyen (datduyng) merged 7 commits into
mainfrom
domnguyen/git-commit-story-init

Conversation

@datduyng

Copy link
Copy Markdown
Contributor

Adds git commit-story init, which registers Copilot CLI hooks for the current repository, and one hook handler.

$ git commit-story init
Registered Copilot hooks in /private/tmp/gcs-e2e/.github/copilot/settings.local.json
$ cat .github/copilot/settings.local.json
{
    "hooks": {
        "userPromptSubmitted": [
            {
                "type": "command",
                "bash": "git commit-story hooks copilot user-prompt-submitted",
                "powershell": "git commit-story hooks copilot user-prompt-submitted"
            }
        ]
    }
}
$ git commit-story hooks copilot user-prompt-submitted
Hello World

settings.local.json is added to .git/info/exclude, so the hooks stay local to the clone. Verified with copilot -p "say hi" in a trusted repo: the hook ran and printed Hello World.

@datduyng

Copy link
Copy Markdown
Contributor Author
CleanShot 2026-09-29 at 8 41 39 AM@2x
06:02:58.347Z  event_type: "hook.start"
06:02:58.732Z  [rust:hooks] [hook stdout] Hello World
06:02:58.732Z  event_type: "hook.end"
06:02:58.734Z  telemetry (kind: user_message)

Confirmed working

@datduyng
Dominic Nguyen (datduyng) marked this pull request as ready for review September 29, 2026 16:11
Comment thread ts/packages/git-commit-story/README.md Outdated
Comment thread ts/packages/git-commit-story/src/commands/init.ts Outdated
Comment thread ts/packages/git-commit-story/src/commands/init.ts
@datduyng
Dominic Nguyen (datduyng) added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit b8dbc08 Sep 29, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants