Skip to content

Commit 24f1981

Browse files
committed
Add workflow
1 parent 30d9225 commit 24f1981

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Auto update PR based on comment
2+
3+
on:
4+
pull_request_review_comment:
5+
types: [created]
6+
7+
env:
8+
HEAD_BRANDH: ${{ github.event.pull_request.head.ref }}
9+
COMMENT_FILE_PATH: ${{ github.event.comment.path }}
10+
COMMENT_BODY: ${{ github.event.comment.body }}
11+
COMMENT_LINE: ${{ github.event.comment.line }}
12+
COMMENT_START_LINE: ${{ github.event.comment.start_line }}
13+
14+
jobs:
15+
update_pr_job:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
with:
21+
ref: ${{ env.HEAD_BRANDH }}
22+
- name: Code Review Action
23+
uses: codemakerai/codemaker-pull-request-action@dev
24+
with:
25+
access-token: ${{ secrets.GITHUB_TOKEN }}
26+
api-key: ${{ secrets.CODEMAKER_API_KEY }}
27+
comment-file-path: ${{ env.COMMENT_FILE_PATH }}
28+
comment-body: ${{ env.COMMENT_BODY }}
29+
comment-line: ${{ env.COMMENT_LINE }}
30+
comment-start-line: ${{ env.COMMENT_START_LINE }}
31+
owner: codemakerai
32+
repository: codemaker-pull-request-action-example
33+
branch: ${{ env.HEAD_BRANDH}}

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# codemaker-pull-request-action-example
2-
CodeMaker GitHub Pull Request Action Example
2+
3+
Example of [codemaker-pull-request-action](https://github.com/codemakerai/codemaker-pull-request-action)
4+
5+
Requirements: give workflow write access to your repo.
6+
7+
Under repo Settings -> Actions -> General -> Workflow permissions, make sure "Read and write permissions" is selected.

0 commit comments

Comments
 (0)