File tree Expand file tree Collapse file tree 1 file changed +9
-17
lines changed
Expand file tree Collapse file tree 1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change 11on :
22 pull_request_target :
33 types : [opened]
4- branches :
5- - dev
6- - release
74
8- permissions : {}
5+ permissions :
6+ pull-requests : write
97
108jobs :
119 thank-user :
12- runs-on : ubuntu-latest
10+ runs-on : ubuntu-20.04
1311 name : Say thanks for the PR
1412 steps :
15- - name : Comment on PR
13+ - name : get message
1614 env :
17- PR_NUMBER : ${{ github.event.pull_request.number }}
18- REPO : ${{ github.repository }}
19- REPO_TOKEN : ${{ secrets.CLI_BOT }}
15+ TITLE : ${{ github.event.pull_request.title }}
2016 run : |
21- message='Thank you for your contribution! We will review the pull request and get back to you soon.'
22-
23- # Comment on the PR using GitHub API
24- curl -X POST \
25- -H "Authorization: token $REPO_TOKEN" \
26- -H "Accept: application/vnd.github.v3+json" \
27- https://api.github.com/repos/$REPO/issues/$PR_NUMBER/comments \
28- -d "{\"body\": \"$message\"}"
17+ pwd
18+ message=$(echo "$TITLE" | grep -oP '[{\[][^}\]]+[}\]]' | sed 's/{\|}\|\[\|\]//g')
19+ echo "Message to be posted: $message end."
20+ echo "message=$message" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments