Skip to content

Commit 7c053f1

Browse files
JoannaaKLCopilot
andauthored
Add default label to all new issues (#1828)
* Add default label to all new issues * Run on all issues * Update .github/workflows/issue-labeler.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/issue-labeler.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent a663a6b commit 7c053f1

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

.github/workflows/ai-issue-assessment.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66

77
jobs:
88
ai-issue-assessment:
9-
if: >
10-
(github.event.action == 'opened' && github.event.issue.labels[0] == null) ||
11-
(github.event.action == 'labeled' && github.event.label.name == 'bug')
129
runs-on: ubuntu-latest
1310
permissions:
1411
issues: write
@@ -23,8 +20,8 @@ jobs:
2320
uses: github/ai-assessment-comment-labeler@e3bedc38cfffa9179fe4cee8f7ecc93bffb3fee7 # v1.0.1
2421
with:
2522
token: ${{ secrets.GITHUB_TOKEN }}
26-
ai_review_label: 'bug, enhancement'
23+
ai_review_label: "request ai review"
2724
issue_number: ${{ github.event.issue.number }}
2825
issue_body: ${{ github.event.issue.body }}
29-
prompts_directory: '.github/prompts'
30-
labels_to_prompts_mapping: 'bug,bug-report-review.prompt.yml|default,default-issue-review.prompt.yml'
26+
prompts_directory: ".github/prompts"
27+
labels_to_prompts_mapping: "bug,bug-report-review.prompt.yml|default,default-issue-review.prompt.yml"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Label issues for AI review
2+
on:
3+
issues:
4+
types:
5+
- reopened
6+
- opened
7+
jobs:
8+
label_issues:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- name: Add AI review label to issue
14+
run: gh issue edit "$NUMBER" --add-label "$LABELS"
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
GH_REPO: ${{ github.repository }}
18+
NUMBER: ${{ github.event.issue.number }}
19+
LABELS: "request ai review"

0 commit comments

Comments
 (0)