Skip to content

Commit 1017760

Browse files
committed
fix(release): limit stable releases to named actors
1 parent 2c1e17b commit 1017760

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎.github/release/plan-release.sh‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# push or dispatch on beta -> beta 0.0.0-beta-<run> desktop only
88
# pull_request -> pr 0.0.0-pr-<run> everything, dry run
99
#
10-
# Releasers are actors with the admin or maintain role on the repository (the releasers team has maintain).
10+
# Stable releases are limited to the GitHub logins listed below (case-insensitive).
1111
. "$(dirname "$0")/lib.sh"
1212

1313
versioned=false
@@ -27,11 +27,9 @@ fi
2727
if [ "$channel" = latest ]; then
2828
actor=${GITHUB_TRIGGERING_ACTOR:-${GITHUB_ACTOR:-}}
2929
[ -n "$actor" ] || die "Stable releases can only be started by releasers; the triggering actor is unknown"
30-
role=$(gh api "repos/$GITHUB_REPOSITORY/collaborators/$actor/permission" --jq .role_name) || role=""
31-
case "$role" in
32-
admin | maintain) ;;
33-
*) die "Stable releases can only be started by releasers (admin or maintain on the repo); $actor has ${role:-no readable role}" ;;
34-
esac
30+
if ! (shopt -s nocasematch; [[ "$actor" = thdxr || "$actor" = Hona || "$actor" = rekram1-node ]]); then
31+
die "$actor is not allowed to start stable releases"
32+
fi
3533
fi
3634

3735
if [ "$channel" = latest ] && [ -n "${INPUT_VERSION:-}" ]; then

0 commit comments

Comments
 (0)