File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Invite GODMODE collaborators. Run as edenbuilds (needs admin on the target repo).
3+ set -euo pipefail
4+
5+ REPO=" ${1:- edenbuilds/ godmode} "
6+ USERS=(aryaxtulip hearteden)
7+ PERMISSION=" ${PERMISSION:- push} "
8+
9+ if ! command -v gh > /dev/null; then
10+ echo " gh CLI required" >&2
11+ exit 1
12+ fi
13+
14+ # If godmode does not exist yet, fall back to bloom (current host of the GODMODE release)
15+ if ! gh repo view " $REPO " > /dev/null 2>&1 ; then
16+ echo " Repo $REPO not found — using edenbuilds/bloom"
17+ REPO=" edenbuilds/bloom"
18+ fi
19+
20+ for user in " ${USERS[@]} " ; do
21+ echo " Inviting @$user → $REPO ($PERMISSION )"
22+ gh api -X PUT " repos/${REPO} /collaborators/${user} " \
23+ -f permission=" $PERMISSION " \
24+ --silent
25+ echo " ok (invite sent or already collaborator)"
26+ done
27+
28+ echo
29+ echo " Pending invitations:"
30+ gh api " repos/${REPO} /invitations" --jq ' .[] | "\(.invitee.login) \(.permissions)"' 2> /dev/null || true
31+ echo " Collaborators:"
32+ gh api " repos/${REPO} /collaborators" --jq ' .[].login'
You can’t perform that action at this time.
0 commit comments