forked from Tencent/Hippy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workflows): change mentioned user in the PR review notification (T…
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 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 |
---|---|---|
|
@@ -78,9 +78,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
MESSAGE: | | ||
Hi, @${{ needs.call_get_workflow_output.outputs.sender }}. | ||
I noticed that our reviewers requested changes to this pull request. | ||
Hi, @{0}, I noticed that our reviewers requested changes to this pull request. | ||
When you're done, **click the `Re-request review` button in the right sidebar(shown below)** to notify the reviewer. | ||
 | ||
steps: | ||
|
@@ -98,13 +96,14 @@ jobs: | |
with open(os.getenv("GITHUB_OUTPUT"), 'w', encoding='utf-8') as file: | ||
file.write("review_state=%s\n" % data["review"]["state"]) | ||
file.write("pull_request_number=%s\n" % data["pull_request"]["number"]) | ||
file.write("pull_request_user=%s\n" % data["pull_request"]["user"]["login"]) | ||
- name: Find | ||
id: find_comment | ||
if: steps.parse_workflow_output.outputs.review_state == 'changes_requested' | ||
uses: peter-evans/[email protected] | ||
with: | ||
issue-number: ${{ steps.parse_workflow_output.outputs.pull_request_number }} | ||
body-includes: ${{ env.MESSAGE }} | ||
body-includes: ${{ format(env.MESSAGE, steps.parse_workflow_output.outputs.pull_request_user) }} | ||
- name: Token | ||
id: get-token | ||
if: steps.find_comment.outputs.comment-id == '' && steps.parse_workflow_output.outputs.review_state == 'changes_requested' | ||
|
@@ -118,5 +117,5 @@ jobs: | |
with: | ||
token: ${{ steps.get-token.outputs.token }} | ||
issue-number: ${{ steps.parse_workflow_output.outputs.pull_request_number }} | ||
body: ${{ env.MESSAGE }} | ||
body: ${{ format(env.MESSAGE, steps.parse_workflow_output.outputs.pull_request_user) }} | ||
reactions: eyes |