File tree Expand file tree Collapse file tree 4 files changed +56
-16
lines changed Expand file tree Collapse file tree 4 files changed +56
-16
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,21 @@ runs:
40
40
"merged-file=$out" >> $env:GITHUB_OUTPUT
41
41
echo "::endgroup::"
42
42
43
- - name : Summarize labels
44
- id : summarize
45
- shell : pwsh
46
- run : |
47
- cat "${{ steps.merge.outputs.merged-file }}"
43
+ - name : Create User prompt file
44
+ id : create-user-prompt
45
+ uses : ./.github/actions/triage-gen-prompt
46
+ with :
47
+ token : ${{ inputs.token }}
48
+ template : ${{ github.action_path }}/user-prompt.md
49
+ output : ${{ steps.setup.outputs.work-dir }}/user-prompt.md
50
+
51
+ - name : Run Triage AI Action
52
+ id : triage-ai
53
+ uses : ./.github/actions/triage-ai
54
+ with :
55
+ prompt-file : " ${{ steps.create-system-prompt.outputs.prompt }}"
56
+ token : ${{ inputs.token }}
57
+ response-file : " ${{ steps.setup.outputs.work-dir }}/ai-response.json"
48
58
49
59
50
60
# - name: Comment on the issue with summary
Original file line number Diff line number Diff line change
1
+ You are an assistant helping to triage GitHub issues. Your
2
+ focus is to summarize some actions and then prove the user
3
+ with an easy to understand message while also being detailed.
4
+
5
+ ** Information To Summarize**
6
+
7
+ The following labels will be applied for the specified reasons:
8
+
9
+ EXEC: jq -r '"| Label | Reason |", "|:-|:-|", (.labels[ ] | "| \( .label) | \( .reason) |")' merged.json
10
+
11
+
12
+ ** Summarization Process**
13
+
14
+ * Summarize all the labels that are being applied in a
15
+ single, short sentence.
16
+ * Provide a sentence or two summarizing in more detail about
17
+ the labels to be applied.
18
+ * Create a table for all the actions that will be performed.
19
+
20
+
21
+ ** Response**
22
+
23
+ * Respond in valid and properly formatted JSON with the
24
+ following structure and only in this structure.
25
+ * Do not wrap the JSON in any other text or formatting,
26
+ including code blocks or markdown.
27
+
28
+ {
29
+ "summary": "SHORT_SUMMARY",
30
+ "details": "DETAILED_SUMMARY",
31
+ "actions": "COMPLETE_ACTION_TABLE"
32
+ }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ outputs:
28
28
runs :
29
29
using : ' composite'
30
30
steps :
31
+
31
32
- name : Create prompt file
32
33
id : create-prompt
33
34
shell : pwsh
43
44
-Output "${{ inputs.output }}"
44
45
"prompt=${{ inputs.output }}" >> $env:GITHUB_OUTPUT
45
46
echo "::endgroup::"
47
+
48
+ - name : Print prompt file
49
+ shell : pwsh
50
+ run : |
51
+ "Print prompt file"
52
+ echo "::group::Print prompt file"
53
+ cat "${{ steps.create-prompt.outputs.prompt }}"
54
+ echo "::endgroup::"
Original file line number Diff line number Diff line change 94
94
template : ${{ github.action_path }}/user-prompt.md
95
95
output : ${{ steps.setup.outputs.work-dir }}/user-prompt.md
96
96
97
- - name : Print prompt files
98
- shell : pwsh
99
- run : |
100
- "Print prompt files"
101
- echo "::group::System Prompt"
102
- cat "${{ steps.create-system-prompt.outputs.prompt }}"
103
- echo "::endgroup::"
104
- echo "::group::User Prompt"
105
- cat "${{ steps.create-user-prompt.outputs.prompt }}"
106
- echo "::endgroup::"
107
-
108
97
- name : Run Triage AI Action
109
98
id : triage-ai
110
99
uses : ./.github/actions/triage-ai
You can’t perform that action at this time.
0 commit comments