Skip to content

Commit e2e74de

Browse files
Fix membership guard
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 5e4a067 commit e2e74de

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ jobs:
215215
retry-exempt-status-codes: 400,401
216216
github-token: ${{ secrets.CLERK_COOKIE_PAT }}
217217
script: |
218-
const isMember = await github.rest.orgs.checkMembershipForUser({
219-
org: 'clerk',
220-
username: context.actor
221-
});
222-
if (!isMember) {
218+
try {
219+
await github.rest.orgs.checkMembershipForUser({
220+
org: 'clerk',
221+
username: context.actor
222+
});
223+
} catch (e) {
223224
core.setFailed(`@${context.actor} is not a member of the Clerk organization`);
224225
}
225226

0 commit comments

Comments
 (0)