-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/migrate-from-getenv-sdk-trace-base
- Loading branch information
Showing
97 changed files
with
1,239 additions
and
919 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Survey on Merged PR by Non-Member | ||
|
||
on: | ||
pull_request_target: | ||
types: [closed] | ||
|
||
env: | ||
PR_NUM: ${{ github.event.pull_request.number }} | ||
SURVEY_URL: https://docs.google.com/forms/d/e/1FAIpQLSf2FfCsW-DimeWzdQgfl0KDzT2UEAqu69_f7F2BVPSxVae1cQ/viewform?entry.1540511742=open-telemetry/opentelemetry-js | ||
|
||
jobs: | ||
comment-on-pr: | ||
name: Add survey to PR if author is not a member | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
if: github.event.pull_request.merged == true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check if user is a member of the org | ||
id: check-membership | ||
run: | | ||
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH") | ||
ORG="${{ github.repository_owner }}" | ||
STATUS=$(gh api "orgs/$ORG/members/$USERNAME" --silent && echo "true" || echo "false") | ||
if [[ "$STATUS" == "true" ]]; then | ||
echo "MEMBER_FOUND=true" >> $GITHUB_ENV | ||
else | ||
echo "MEMBER_FOUND=false" >> $GITHUB_ENV | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} | ||
|
||
- name: Add comment to PR if author is not a member | ||
if: env.MEMBER_FOUND == 'false' | ||
run: | | ||
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH") | ||
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry-js --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})." | ||
env: | ||
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.