Initial commit
This commit is contained in:
11
.claude-plugin/plugin.json
Normal file
11
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "coderabbit",
|
||||
"description": "Code Rabbit 関連",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "yaakaito"
|
||||
},
|
||||
"commands": [
|
||||
"./commands"
|
||||
]
|
||||
}
|
||||
37
commands/fix-pr-reviews.md
Normal file
37
commands/fix-pr-reviews.md
Normal file
@@ -0,0 +1,37 @@
|
||||
GitHub 上の PR から対応が必要なレビューコメントを取得し、修正を行います。
|
||||
|
||||
1. gh を使って、現在のリポジトリの owner reponame pr-number を取得します。
|
||||
2. 以下のコマンドを実行して、未解決のレビューコメントを取得してください、$ONWER $REPO $PR_NUMBER は 1. で取得したものに置き換えてください。
|
||||
|
||||
```bash
|
||||
gh api graphql -f query='
|
||||
query($owner: String!, $repo: String!, $number: Int!) {
|
||||
repository(owner: $owner, name: $repo) {
|
||||
pullRequest(number: $number) {
|
||||
reviewThreads(first: 100) {
|
||||
nodes {
|
||||
isResolved
|
||||
isOutdated
|
||||
comments(first: 10) {
|
||||
nodes {
|
||||
author { login }
|
||||
body
|
||||
path
|
||||
line
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -f owner="$OWNER" -f repo="$REPO" -F number=$PR_NUMBER | jq -r '.data.repository.pullRequest.reviewThreads.nodes
|
||||
| map(select(.isResolved == false))
|
||||
| .[]
|
||||
| "<review-comment>\n <file>\(.comments.nodes[0].path)</file>\n <line>\(.comments.nodes[0].line)</line>\n
|
||||
<author>\(.comments.nodes[0].author.login)</author>\n <body>\(.comments.nodes[0].body)</body>\n</review-comment>\n"'
|
||||
```
|
||||
|
||||
3. 取得した review-comments を一つづつ確認してすべて修正してください。未解決のレビューがなければ終了してください。
|
||||
4. 一つ修正を行う事にその内容を commit してください。
|
||||
5. すべての修正が完了するまで繰り返します。
|
||||
6. すべての修正が完了したら、ブランチを remote へ push してください。
|
||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:yaakaito/env:cc-plugins/coderabbit",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "a466cdd998df5eb5756b230162400982959b6f88",
|
||||
"treeHash": "42d1ac04094fd428dea75816c668fdcc8c3c07b0ab44204888ddff1a7a136c74",
|
||||
"generatedAt": "2025-11-28T10:29:07.743413Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "coderabbit",
|
||||
"description": "Code Rabbit 関連",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "4a0246b32e70bab6633f85cd36413e32d978267bf5388cb8c9151d60fe419fd5"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "ecc560bf571c784d9133b3dd86a4741ade531a8b9bffb1074c3f9502721e935f"
|
||||
},
|
||||
{
|
||||
"path": "commands/fix-pr-reviews.md",
|
||||
"sha256": "63dd2e1b7f1fead341c0d2acbf13201c3a2e7e782d24b29795a2ccffd41f5f13"
|
||||
}
|
||||
],
|
||||
"dirSha256": "42d1ac04094fd428dea75816c668fdcc8c3c07b0ab44204888ddff1a7a136c74"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user