-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix workflow permission check logic #4084
Conversation
28cc004
to
101e62a
Compare
@RCGitBot please test |
1 similar comment
@RCGitBot please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@RCGitBot please test |
Will merge this for now, we can figure any other issues in followup PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for taking care of it!
id: verify | ||
# ensure that only RevenueCat members can trigger this | ||
run: | | ||
RESPONSE=$(curl https://api.github.com/orgs/RevenueCat/members/${{ github.event.comment.user.login }}) | ||
if [[ "$RESPONSE" == *"Not Found"* ]]; then | ||
RESPONSE=$(curl -s -o /dev/null --head -w "%{http_code}" -H "Authorization: Bearer $READ_ORG_GITHUB_TOKEN" https://api.github.com/orgs/RevenueCat/members/${{ github.event.comment.user.login }}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably add a comment and maybe use \
to split this up into lines for clarity
@RCGitBot please test |
### Description Small cleanup from comments in #4084
### Description This improves the permission checking logic for running github actions. We also have it setup to only run actions by organization members, but this acts as an additional check. --------- Co-authored-by: Andy Boedo <[email protected]>
### Description Small cleanup from comments in #4084
Description
This improves the permission checking logic for running github actions. We also have it setup to only run actions by organization members, but this acts as an additional check.