~cytrogen/gstack

ref: b5b2a15ad2df1d3ea0fe4850fded7a0f23aec08b gstack/browse/bin/remote-slug -rwxr-xr-x 572 bytes
b5b2a15a — Garry Tan fix: pass all LLM evals — severity defs, rubric edge cases, EVALS=1 flag a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
# Output the remote slug (owner-repo) for the current git repo.
# Used by SKILL.md files to derive project-specific paths in ~/.gstack/projects/.
set -e
URL=$(git remote get-url origin 2>/dev/null || true)
if [ -n "$URL" ]; then
  # Strip trailing .git if present, then extract owner/repo
  URL="${URL%.git}"
  # Handle both SSH (git@host:owner/repo) and HTTPS (https://host/owner/repo)
  OWNER_REPO=$(echo "$URL" | sed -E 's#.*[:/]([^/]+)/([^/]+)$#\1-\2#')
  echo "$OWNER_REPO"
else
  basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
fi