Skip to content

Commit 4e2d165

Browse files
Updated documentation
1 parent 3045da6 commit 4e2d165

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

README.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ This GitHub action takes 2 (required) inputs:
1919

2020
### Limitation
2121

22-
Due to the limitation of Github workflow, there is no good way to handle concurrent run. The comment line number is an import parameter for CodeMaker processor to perform generation. Since the line number is determined when ```pull_request_review_comment``` web hook event is triggerred, multiple concurrent workflow trigger will cause the line number to be outdated because some other runs may have already updated the file content.
23-
24-
Because of this limitation, it is important to post PR comment one by one, and do not post a new one until the workflow run triggerred by the previous one has completed.
25-
26-
We are currently working on a solution on this.
22+
The best way of using this action is through either Pull Request code review, when multiple comments can be submitted at
23+
once or through single pull requests comment. Creating multiple single comments in quick succession will cause race
24+
condition as the comments will become out of sync with the code. Submitting multiple comments at once can be done in
25+
reliable way only through pull request code review.
2726

2827
```
2928
name: Auto update PR based on comment
@@ -32,13 +31,6 @@ on:
3231
pull_request_review_comment:
3332
types: [created]
3433
35-
env:
36-
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
37-
COMMENT_FILE_PATH: ${{ github.event.comment.path }}
38-
COMMENT_BODY: ${{ github.event.comment.body }}
39-
COMMENT_LINE: ${{ github.event.comment.line }}
40-
COMMENT_START_LINE: ${{ github.event.comment.start_line }}
41-
4234
concurrency:
4335
group: ${{ github.workflow }} - ${{ github.event.pull_request.head.ref }}
4436
@@ -55,13 +47,6 @@ jobs:
5547
with:
5648
access-token: ${{ secrets.GITHUB_TOKEN }}
5749
api-key: ${{ secrets.CODEMAKER_API_KEY }}
58-
comment-file-path: ${{ env.COMMENT_FILE_PATH }}
59-
comment-body: ${{ env.COMMENT_BODY }}
60-
comment-line: ${{ env.COMMENT_LINE }}
61-
comment-start-line: ${{ env.COMMENT_START_LINE }}
62-
owner: YOUR_USER_OR_ORG_NAME
63-
repository: YOUR_REPO_NAME
64-
branch: ${{ env.HEAD_BRANCH}}
6550
```
6651

6752
## License

0 commit comments

Comments
 (0)