Skip to content

Instantly share code, notes, and snippets.

View hamstu's full-sized avatar
🤩

Hamish Macpherson hamstu

🤩
View GitHub Profile
[alias]
branch-cleanup = "!git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d #"
ca = !git add -A && git commit -av
s = status -s
l = log --pretty=oneline -n 20 --graph --abbrev-commit
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
la = "!git config -l | grep alias | cut -c 7-"
ca = !git add -A && git commit -av
co = checkout
export async function summarizeThread(
thread: Thread,
authorName: string
): Promise<CreateChatCompletionResponse> {
const allTextFromThread = thread.blocks
.map((block) => block.plaintext)
.join("\n");
const openai = await OpenAI.getClient();
const completion = await openai.createChatCompletion({
model: "gpt-3.5-turbo",
@hamstu
hamstu / gh-prs
Created March 31, 2025 20:08
Get my need to review PRs (tested only on macOS!)
#!/bin/bash
# Colors
BOLD="\033[1m"
GREEN="\033[0;32m"
YELLOW="\033[1;33m"
BLUE="\033[0;34m"
NC="\033[0m" # No Color
# Helper to print a PR entry