Skip to content

Commit ab5b62c

Browse files
authored
Merge pull request #14 from otoneko1102/dev/add-packs
Dev/add packs
2 parents e535228 + 507bef5 commit ab5b62c

5 files changed

Lines changed: 227 additions & 2 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ body:
4747
id: version
4848
attributes:
4949
label: mixi2-js バージョン
50-
placeholder: "例: 1.3.0"
50+
placeholder: "例: 1.4.0"
5151
validations:
5252
required: true
5353

5454
- type: input
5555
id: node
5656
attributes:
5757
label: Node.js バージョン
58-
placeholder: "例: 22.0.0"
58+
placeholder: "例: 24.0.0"
5959
validations:
6060
required: false
6161

@@ -69,3 +69,28 @@ body:
6969
- 該当しない
7070
validations:
7171
required: false
72+
73+
- type: dropdown
74+
id: module
75+
attributes:
76+
label: 問題のあるモジュール(該当する場合)
77+
multiple: true
78+
options:
79+
- Client
80+
- OAuth2Authenticator
81+
- WebhookServer
82+
- StreamWatcher
83+
- MediaUploader
84+
- Helpers(EventRouter, PostBuilder など)
85+
- 型定義・Enum
86+
- その他
87+
validations:
88+
required: false
89+
90+
- type: textarea
91+
id: additional
92+
attributes:
93+
label: 補足情報(任意)
94+
description: 関連する Issue、PR、環境情報などがあれば記載してください。
95+
validations:
96+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: npm
4+
url: https://www.npmjs.com/package/mixi2-js
5+
about: npm パッケージページ
6+
- name: JSR
7+
url: https://jsr.io/@otoneko1102/mixi2-js
8+
about: JSR パッケージページ
9+
- name: ドキュメント
10+
url: https://mixi2.js.org
11+
about: 公式ドキュメント(使い方・API リファレンス)

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,14 @@ body:
4949
- その他
5050
validations:
5151
required: true
52+
53+
- type: dropdown
54+
id: breaking
55+
attributes:
56+
label: 破壊的変更の可能性
57+
options:
58+
- なし(後方互換)
59+
- あり(メジャーバージョンアップが必要)
60+
- 不明
61+
validations:
62+
required: false
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: 上流 API 仕様変更への追従
2+
description: mixigroup/mixi2-api または mixigroup/mixi2-application-sdk-go の新バージョンに追従するタスク
3+
labels: ["upstream", "enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
上流リポジトリの変更に追従するための Issue です。
9+
通常はワークフローによって自動作成されますが、手動で作成する場合に使用してください。
10+
11+
- type: dropdown
12+
id: repo
13+
attributes:
14+
label: 対象リポジトリ
15+
options:
16+
- mixigroup/mixi2-api
17+
- mixigroup/mixi2-application-sdk-go
18+
validations:
19+
required: true
20+
21+
- type: input
22+
id: new_version
23+
attributes:
24+
label: 新バージョン
25+
placeholder: "例: v1.2.0"
26+
validations:
27+
required: true
28+
29+
- type: input
30+
id: current_version
31+
attributes:
32+
label: 現在の対応バージョン
33+
placeholder: "例: v1.1.0"
34+
validations:
35+
required: true
36+
37+
- type: textarea
38+
id: changes
39+
attributes:
40+
label: 変更概要
41+
description: 新バージョンでの主な変更点を記載してください(リリースノートから抜粋可)。
42+
placeholder: |
43+
- 新規 RPC: `FooBar`
44+
- 型変更: `SomeRequest.field` が `string` → `int32` に変更
45+
validations:
46+
required: false
47+
48+
- type: checkboxes
49+
id: checklist
50+
attributes:
51+
label: 対応チェックリスト
52+
options:
53+
- label: リリースノートを確認した
54+
- label: proto ファイルを更新した(変更があれば)
55+
- label: 新規 RPC を実装した(追加があれば)
56+
- label: 既存実装を修正した(変更・廃止があれば)
57+
- label: 型定義・Enum を追加・修正した
58+
- label: テストを追加・更新した
59+
- label: ドキュメント(`pages/`)を更新した
60+
- label: CHANGELOG.md を更新した
61+
- label: バージョンを更新して npm / JSR に公開した
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: 上流 API リリース監視
2+
3+
on:
4+
schedule:
5+
- cron: "0 11 * * *" # 毎日 JST 20:00
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
contents: read
11+
12+
jobs:
13+
check:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- repo: mixigroup/mixi2-api
20+
name: mixi2-api
21+
description: "proto 定義・API 仕様"
22+
- repo: mixigroup/mixi2-application-sdk-go
23+
name: mixi2-application-sdk-go
24+
description: "公式 Go SDK"
25+
26+
steps:
27+
- name: 最新リリースを取得
28+
id: release
29+
env:
30+
GH_TOKEN: ${{ github.token }}
31+
run: |
32+
if ! response=$(gh api "repos/${{ matrix.repo }}/releases/latest" 2>/dev/null); then
33+
echo "No release found for ${{ matrix.repo }}, skipping."
34+
echo "skip=true" >> "$GITHUB_OUTPUT"
35+
exit 0
36+
fi
37+
tag=$(echo "$response" | jq -r '.tag_name')
38+
url=$(echo "$response" | jq -r '.html_url')
39+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
40+
echo "url=$url" >> "$GITHUB_OUTPUT"
41+
echo "skip=false" >> "$GITHUB_OUTPUT"
42+
43+
- name: 同一バージョンの Issue が存在するか確認
44+
id: check
45+
if: steps.release.outputs.skip != 'true'
46+
env:
47+
GH_TOKEN: ${{ github.token }}
48+
run: |
49+
tag="${{ steps.release.outputs.tag }}"
50+
count=$(gh issue list \
51+
--repo "${{ github.repository }}" \
52+
--state all \
53+
--limit 500 \
54+
--json title \
55+
--jq "[.[] | select(.title | (contains(\"${{ matrix.name }}\") and contains(\"${tag}\")))] | length")
56+
echo "count=$count" >> "$GITHUB_OUTPUT"
57+
58+
- name: upstream ラベルを作成(存在しない場合)
59+
if: steps.release.outputs.skip != 'true' && steps.check.outputs.count == '0'
60+
env:
61+
GH_TOKEN: ${{ github.token }}
62+
run: |
63+
gh label create "upstream" \
64+
--color "0075ca" \
65+
--description "上流リポジトリの変更への追従" \
66+
--repo "${{ github.repository }}" \
67+
--force
68+
69+
- name: Issue を作成
70+
if: steps.release.outputs.skip != 'true' && steps.check.outputs.count == '0'
71+
env:
72+
GH_TOKEN: ${{ github.token }}
73+
run: |
74+
tag="${{ steps.release.outputs.tag }}"
75+
cat > /tmp/issue-body.md << ISSUEEOF
76+
## 概要
77+
78+
上流リポジトリ [${{ matrix.repo }}](https://github.com/${{ matrix.repo }}) の新バージョン **${tag}** がリリースされました。
79+
mixi2-js への追従が必要か確認・対応してください。
80+
81+
## リンク
82+
83+
- 🔖 [リリースノート](${{ steps.release.outputs.url }})
84+
- 📂 [リポジトリ](https://github.com/${{ matrix.repo }})
85+
- 🔍 [前バージョンとの差分](https://github.com/${{ matrix.repo }}/releases)
86+
87+
---
88+
89+
## 対応チェックリスト
90+
91+
### 調査
92+
- [ ] リリースノートを確認する
93+
- [ ] ${{ matrix.description }} の変更点を確認する(新規 RPC・型・フィールドの追加、既存の変更・廃止など)
94+
95+
### 実装
96+
- [ ] proto ファイルを更新する(変更があれば)
97+
- [ ] 新規 RPC を実装する(追加があれば)
98+
- [ ] 既存実装を修正する(変更・廃止があれば)
99+
- [ ] 型定義・Enum を追加・修正する
100+
- [ ] テストを追加・更新する
101+
102+
### リリース
103+
- [ ] ドキュメント(pages/)を更新する
104+
- [ ] CHANGELOG.md を更新する
105+
- [ ] バージョンを更新して npm / JSR に公開する
106+
107+
---
108+
109+
> このIssueは[上流APIリリース監視ワークフロー](https://github.com/${{ github.repository }}/actions/workflows/check-upstream.yml)によって自動作成されました。
110+
ISSUEEOF
111+
112+
gh issue create \
113+
--repo "${{ github.repository }}" \
114+
--title "⬆️ ${{ matrix.name }} ${tag} がリリースされました" \
115+
--label "upstream" \
116+
--label "enhancement" \
117+
--body-file /tmp/issue-body.md

0 commit comments

Comments
 (0)