Maki commited on
Commit
24e89a4
·
unverified ·
1 Parent(s): ca2480e

Add files via upload

Browse files
.github/workflows/issue-auto-labeling.yml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Auto Label Issues
2
+
3
+ on:
4
+ issues:
5
+ types: [opened]
6
+
7
+ permissions:
8
+ issues: write
9
+
10
+ jobs:
11
+ auto-label:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Install OpenAI Codex
19
+ run: npm install -g @openai/codex@0.1.2504251709
20
+
21
+ - name: GitHub CLIをインストール
22
+ run: |
23
+ type -p curl >/dev/null || apt install curl -y
24
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
25
+ && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
26
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
27
+ && sudo apt update \
28
+ && sudo apt install gh -y
29
+
30
+ - name: Auto-label Issue
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
34
+ run: |
35
+ # Codexに必要なラベルを作成・確認してから、issueにラベルを付与させる
36
+ codex --full-auto --quiet --model o3 "以下の手順で実行してください:
37
+
38
+ Issue番号: #${{ github.event.issue.number }}
39
+ タイトル: ${{ github.event.issue.title }}
40
+ 内容: ${{ github.event.issue.body }}
41
+
42
+ 1. まず現在のラベル一覧を確認:
43
+ gh label list
44
+
45
+ 2. 必要なラベルがない場合は作成(例:bugラベルがない場合):
46
+ gh label create bug --color 'ee0701' --description 'バグに関するissue'
47
+ gh label create documentation --color '0052cc' --description 'ドキュメントに関するissue'
48
+ gh label create enhancement --color '0e8a16' --description '機能改善・追加の提案'
49
+ gh label create 'help wanted' --color '5319e7' --description 'サポートが必要なissue'
50
+ gh label create question --color 'd876e3' --description '質問に関するissue'
51
+
52
+ 3. issueの内容を分析して適切なラベルを選択:
53
+ gh issue edit ${{ github.event.issue.number }} --add-label 'bug'
54
+ (例:バグの場合は'bug'、ドキュメントの場合は'documentation')
55
+
56
+ 4. 最後に現在のラベル一覧を表示:
57
+ gh label list"