Skip to content

Commit 20f56ca

Browse files
chore: add script to invite aryaxtulip and hearteden
Co-authored-by: edenbuilds <edenbuilds@users.noreply.github.com>
1 parent 283aab0 commit 20f56ca

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

scripts/add-collaborators.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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'

0 commit comments

Comments
 (0)