-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create answered-question-feedback.yml
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 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,39 @@ | ||
name: Post survey on answered questions | ||
|
||
# WIP todo: create survey link and update message | ||
# on: | ||
# discussion: | ||
# types: [answered] | ||
|
||
permissions: | ||
discussions: write | ||
|
||
jobs: | ||
post-comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run GraphQL Query | ||
uses: octokit/graphql-action@v2.x | ||
id: get_discussion | ||
with: | ||
query: | | ||
query { | ||
repository(owner: "sbvegan", name: "csat-test") { | ||
discussion(number: ${{ github.event.discussion.number }}) { | ||
id | ||
} | ||
} | ||
} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Comment on Discussion | ||
uses: wesleyscholl/create-discussion-comment@v1.0.18 | ||
id: create-comment | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
discussion-id: ${{ fromJSON(steps.get_discussion.outputs.data).repository.discussion.id }} | ||
body: Thank you for participating in our discussions! We would love to hear your feedback. |