This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 9
/
action.yml
89 lines (81 loc) · 2.88 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: 'chatgpt-action'
description: 'A collection of ChatGPT assistants, e.g., code viewer, labeler, assigner, etc.'
author: 'Tao He'
inputs:
action:
type: string
required: false
description: 'The action to run, currently can be "review", "score"'
default: 'review'
debug:
type: boolean
required: false
description: 'Enable debug mode'
default: false
path_filters:
type: string
required: false
description: |
The path filters, e.g., "src/**.py", "!dist/**", each line will be considered as one pattern.
See also
- https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
- https://github.com/isaacs/minimatch
default: |
!dist/**
**/package-lock.json
chatgpt_reverse_proxy:
type: boolean
required: false
description: |
The URL of the chatgpt reverse proxy, see also https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy
default: https://chat.duti.tech/api/conversation
review_comment_lgtm:
type: boolean
required: false
description: 'Leave comments even the patch is LGTM'
default: false
review_beginning:
type: string
required: false
description: "The beginning prompt of a code review dialog"
default: |
Hi ChatGPT, I have a pull request with title "$title" and the description is as follows,
> $description.
Next, I will given you a series of patches, each of them consists of a filename and a diff
snippet, and you need to do a brief code review for every message, and tell me any bug risk
and improvement suggestion. If the patch is looks good and acceptable, please reply "LGTM!"
with a short comment with 30 words.
You answer should be concise. Don't include the diff in your comment, and markdown format is
preferred. Reply "OK" to confirm.
review_patch:
type: string
required: false
description: 'The prompt for each chunks/patches'
default: |
$filename
```diff
$patch
```
scoring_beginning:
type: string
required: false
description: 'The prompt for the whole pull request'
default: |
Hi ChatGPT, I have a pull request with title "$title" and the description is as follows,
> $description
I would like score the pull request, the score should be a number between 0 and 100
and 85 means the the pull request is basically acceptable. You just need to reply a
number between 0 and 100, e.g., "85", and a comment within 30 words. Next, I would
give you the whole diff of the pull request. Reply "OK" to confirm.
scoring:
type: string
required: false
description: 'The prompt for the whole diff for scoring'
default: |
The diff is as follows:
```diff
$diff
```
runs:
using: 'node16'
main: 'dist/index.js'