Skip to content

Commit 8b1eda0

Browse files
authored
Fix survey-on-merged-pr.yml
This workflow still doesn't work. This time I try to fix id by adding permissions to the job
1 parent 9e74e88 commit 8b1eda0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/survey-on-merged-pr.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ on:
44
pull_request:
55
types: [closed]
66

7+
env:
8+
PR_NUM: ${{ github.event.issue.number }}
9+
SURVEY_URL: https://forms.gle/WV58koUBGSG9HBY66
10+
711
jobs:
812
comment-on-pr:
13+
name: Add survey to PR if author is not a member
914
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
1018
if: github.event.pull_request.merged == true
1119
steps:
1220
- name: Check if user is a member of the org
@@ -26,7 +34,6 @@ jobs:
2634
- name: Add comment to PR if author is not a member
2735
if: env.MEMBER_FOUND == 'false'
2836
run: |
29-
PR_NUMBER=${{ github.event.pull_request.number }}
30-
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"
37+
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}"
3138
env:
3239
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)