You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STATUS=$(gh api "orgs/$ORG/members/$USERNAME" --silent && echo "true" || echo "false")
30
-
if [[ "$STATUS" == "true" ]]; then
31
-
echo "MEMBER_FOUND=true" >> $GITHUB_ENV
32
-
else
33
-
echo "MEMBER_FOUND=false" >> $GITHUB_ENV
31
+
32
+
# Skip if user is a bot
33
+
if [[ "$USER_TYPE" == "Bot" ]]; then
34
+
echo "Skipping survey for bot user: $USERNAME"
35
+
exit 0
34
36
fi
37
+
38
+
# Skip if user is an org member
39
+
if gh api "orgs/$ORG/members/$USERNAME" --silent; then
40
+
echo "Skipping survey for org member: $USERNAME"
41
+
exit 0
42
+
fi
43
+
44
+
# Add survey comment for external contributor
45
+
echo "Adding survey comment for external contributor: $USERNAME"
46
+
gh pr comment ${PR_NUM} --repo ${{ github.repository }} --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry-js-contrib --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
0 commit comments