-
Notifications
You must be signed in to change notification settings - Fork 660
30 lines (28 loc) · 1.26 KB
/
issue-close-user-survey.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Issue Close User Survey
on:
issues:
types: [closed]
jobs:
user-survey-comment:
permissions:
issues: write
runs-on: ubuntu-latest
if: github.repository == 'apollographql/apollo-kotlin'
steps:
- run: |
if [ "$STATE_REASON" != "completed" ]; then
echo "Issue was closed as not planned, skipping user survey."
elif (( $COMMENTS == 0 )); then
echo "Issue with no comments, skipping user survey."
else
gh issue comment "$NUMBER" --body "$BODY"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
STATE_REASON: ${{ github.event.issue.state_reason }}
COMMENTS: ${{ github.event.issue.comments }}
AUTHOR: ${{ github.event.issue.author_association }}
BODY: >
Do you have any feedback for the maintainers? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Kotlin&entry.204965213=GitHub+Issue). Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.