Skip to content

Commit bd7290a

Browse files
committed
Remove redundant workflow step
1 parent 94485eb commit bd7290a

1 file changed

Lines changed: 10 additions & 32 deletions

File tree

.github/workflows/reusable-issue-triage.yml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,14 @@ jobs:
3535
const labelNames = labels.data.map(label => label.name);
3636
return labelNames.join(', ');
3737
38-
- name: Set environment variables
38+
- name: Analyze with AI
39+
id: ai-triage
40+
uses: actions/ai-inference@17ff458cb182449bbb2e43701fcd98f6af8f6570 # v2
3941
env:
42+
AVAILABLE_LABELS: ${{ steps.get-labels.outputs.result }}
4043
ITEM_TITLE: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.title || github.event.issue.title }}
4144
ITEM_BODY: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.body || github.event.issue.body }}
4245
ITEM_TYPE: ${{ github.event_name == 'pull_request_target' && 'pull request' || 'issue' }}
43-
LABELS_RESULT: ${{ steps.get-labels.outputs.result }}
44-
run: |
45-
{
46-
echo "AVAILABLE_LABELS=${LABELS_RESULT}"
47-
echo "ITEM_TITLE=${ITEM_TITLE}"
48-
echo "ITEM_TYPE=${ITEM_TYPE}"
49-
echo "ITEM_BODY<<EOF"
50-
echo "${ITEM_BODY}"
51-
echo "EOF"
52-
} >> "$GITHUB_ENV"
53-
54-
- name: Analyze with AI
55-
id: ai-triage
56-
uses: actions/ai-inference@17ff458cb182449bbb2e43701fcd98f6af8f6570 # v2
5746
with:
5847
prompt: |
5948
## Role
@@ -108,7 +97,7 @@ jobs:
10897
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
10998
env:
11099
AI_RESPONSE: ${{ steps.ai-triage.outputs.response }}
111-
AVAILABLE_LABELS: ${{ env.AVAILABLE_LABELS }}
100+
AVAILABLE_LABELS: ${{ steps.get-labels.outputs.result }}
112101
with:
113102
script: |
114103
const response = process.env.AI_RESPONSE;
@@ -275,25 +264,14 @@ jobs:
275264
type: itemType
276265
};
277266
278-
- name: Set environment variables
267+
- name: Analyze with AI
268+
id: ai-triage
269+
uses: actions/ai-inference@17ff458cb182449bbb2e43701fcd98f6af8f6570 # v2
279270
env:
271+
AVAILABLE_LABELS: ${{ steps.get-labels.outputs.result }}
280272
ITEM_TITLE: ${{ fromJSON(steps.get-item.outputs.result).title }}
281273
ITEM_BODY: ${{ fromJSON(steps.get-item.outputs.result).body }}
282274
ITEM_TYPE: ${{ fromJSON(steps.get-item.outputs.result).type }}
283-
LABELS_RESULT: ${{ steps.get-labels.outputs.result }}
284-
run: |
285-
{
286-
echo "AVAILABLE_LABELS=${LABELS_RESULT}"
287-
echo "ITEM_TITLE=${ITEM_TITLE}"
288-
echo "ITEM_TYPE=${ITEM_TYPE}"
289-
echo "ITEM_BODY<<EOF"
290-
echo "${ITEM_BODY}"
291-
echo "EOF"
292-
} >> "$GITHUB_ENV"
293-
294-
- name: Analyze with AI
295-
id: ai-triage
296-
uses: actions/ai-inference@17ff458cb182449bbb2e43701fcd98f6af8f6570 # v2
297275
with:
298276
prompt: |
299277
## Role
@@ -349,7 +327,7 @@ jobs:
349327
env:
350328
AI_RESPONSE: ${{ steps.ai-triage.outputs.response }}
351329
ITEM_NUMBER: ${{ inputs.issue_number }}
352-
AVAILABLE_LABELS: ${{ env.AVAILABLE_LABELS }}
330+
AVAILABLE_LABELS: ${{ steps.get-labels.outputs.result }}
353331
with:
354332
script: |
355333
const response = process.env.AI_RESPONSE;

0 commit comments

Comments
 (0)