Skip to content

Commit b70ae8d

Browse files
Add PR first response workflow
1 parent 89f3f60 commit b70ae8d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: pr-first-response
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
send-response:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Fetch random comment 🗣️
12+
uses: JamesIves/[email protected]
13+
with:
14+
ENDPOINT: https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment
15+
CONFIGURATION: '{ "method": "POST", "headers": {"Authorization": "Bearer ${{ secrets.OUR_BOT_API_TOKEN }}"}, "body": { "repo": "${{ github.repository }}", "number": "${{ github.event.number }}", "actor": "${{ github.actor }}", "commentType": "opened-pr-first-comment"} }'
16+
- name: Add PR comment
17+
if: "${{ env.fetch-api-data != '' }}"
18+
uses: actions/github-script@v5
19+
with:
20+
script: |
21+
github.rest.issues.createComment({
22+
issue_number: context.issue.number,
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
body: `${{ env.fetch-api-data }}`
26+
})

0 commit comments

Comments
 (0)