Skip to content

Commit

Permalink
Fix survey-on-merged-pr.yml
Browse files Browse the repository at this point in the history
This workflow still doesn't work. This time I try to fix id by adding permissions to the job
  • Loading branch information
svrnm authored Jan 10, 2025
1 parent 9e74e88 commit 8b1eda0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/survey-on-merged-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ on:
pull_request:
types: [closed]

env:
PR_NUM: ${{ github.event.issue.number }}
SURVEY_URL: https://forms.gle/WV58koUBGSG9HBY66

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:
- name: Check if user is a member of the org
Expand All @@ -26,7 +34,6 @@ jobs:
- name: Add comment to PR if author is not a member
if: env.MEMBER_FOUND == 'false'
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
gh pr comment $PR_NUMBER --body "Thank you for your contribution! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by filling out this survey: https://forms.gle/WV58koUBGSG9HBY66"
gh pr comment ${PR_NUM} --body "Thank you for your contribution! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by filling out this survey: ${SURVEY_URL}"
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}

0 comments on commit 8b1eda0

Please sign in to comment.