本文へ移動
cccskills
無料GitHub で公開日本語紹介

gh-pull-request

変更をコンパイルやライセンス表記などの事前確認に通し、PRブランチへコミット・プッシュします。PRがなければ所定の形式で作成するスキルです。

原文原文の説明を見る

Verify, commit, and push changes on a PR branch. Runs pre-flight checks (compile, checkstyle, license headers) before every push. Also creates the PR if one doesn't exist yet.

apache/skywalkingスター 24,978(GitHub 24,978 + cccskills 0)
連携ツールGitHub

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • PR提出前に変更を確認したいとき
  • ブランチの変更をコミット・送信したいとき
  • 現在のブランチからPRを作成したいとき

日本語での紹介

できること

PRブランチの変更を送る前に、コンパイル、Checkstyle、ライセンスヘッダー、変更したJavaファイルの完全修飾クラス名を確認します。問題を修正して再確認した後、変更をコミットしてブランチをプッシュします。現在のブランチにPRがなければ、プロジェクトのテンプレートに沿った説明で作成し、指定されたレビュアーを追加します。PRのマージ後に、変更が既定ブランチへ反映されたことを確かめてから、ローカルブランチを整理する手順も案内します。

こんなときに便利

変更をPRとして提出する前の確認と送信を進めたいときに向いています。ビルドやライセンス表記の確認から、PR作成後のブランチ整理まで、手順をまとめて扱えます。

使い方の例

  • 「変更をチェックして、PRブランチにコミットしてプッシュしてください」
  • 「このブランチにPRがなければ、テンプレートに沿って作成してください」
  • 「マージ済みの変更を確認して、ローカルブランチを整理してください」

注意点

プロジェクトのMavenラッパー、license-eye、Git、ghを使います。PR作成時は.github/PULL_REQUEST_TEMPLATEを参照します。作業ブランチで進め、masterでは直接作業しません。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

資料チェック

SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。

安全面送信・削除・コマンド実行などの扱いが明示されているか
B一部不足masterで作業しない指示とマージ確認はある一方、pushやブランチ削除を行います。
導入のしやすさ必要なツールや API キーが少ないか、書かれているか
B一部不足Mavenラッパー、license-eye、Git、ghの利用を示しますが導入手順はありません。

点数には入れていません。 2026年10月29日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。

評価が違うと思ったら、見直しを依頼する

どの項目が、なぜ違うと思うかを書いてください。ログインは不要です。内容を SKILL.md と照らし合わせて評価を作り直し、この欄に反映します。

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

含まれるファイル(1)

  • SKILL.md6.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

PR Branch Workflow

Run pre-flight checks, commit, push, and optionally create a PR.

Pre-flight checks

Run these checks before every commit+push and fix any failures:

1. Compile and checkstyle

# Checkstyle
./mvnw -B -q clean checkstyle:check

# Full build (compile + javadoc)
./mvnw clean flatten:flatten install javadoc:javadoc -B -q -Pall \
  -Dmaven.test.skip \
  -Dcheckstyle.skip \
  -Dgpg.skip

2. License header check

license-eye header check

If invalid files are found, fix with license-eye header fix and re-check.

3. Unnecessary fully-qualified class names

The project checkstyle forbids inline FQCNs — every type reference in code should resolve through an import, not a fully-qualified name. Checkstyle does not always catch this (it misses cases like inline java.util.HashMap, java.util.concurrent.TimeUnit, or org.apache.skywalking.oap.server.telemetry.api.HistogramMetrics.Timer used as a local variable type, generic parameter, or new target). Audit the files the branch touched before pushing:

Use the Grep tool (ripgrep) rather than BSD grep on macOS — the scan below relies on a negative lookahead that BSD grep doesn't support and GNU grep -P does:

pattern: ^(?!\s*(import |package |\s*\*)).*\b(java\.util\.|java\.io\.|java\.nio\.|java\.util\.concurrent\.|javassist\.|org\.apache\.skywalking\.)[A-Z][A-Za-z0-9_]*
glob:    *.java
output_mode: content
-n: true

Scope the scan to files the branch touched, not the whole tree — pre-existing FQDNs on unrelated files generate noise. Use git diff --name-only master...HEAD -- '*.java' to get the changed list, then run the ripgrep pattern against each.

Acceptable exceptions (same as the CLAUDE.md rule):

  • Two classes with the same simple name would collide if both imported.
  • A Javadoc {@link} where the short name would be ambiguous to the reader.
  • Inside a string literal (e.g., a class name passed to Class.forName).

Fix every other hit — add an import and switch to the short name. This includes new java.util.HashMap<>(), java.util.Set<String> parameter types, and org.apache.skywalking.oap.server.telemetry.api.HistogramMetrics.Timer as a local variable type. Field declarations, method signatures, local variables, and generic type arguments should all use the imported short name.

Re-run checkstyle after the fix — a sloppy sed/replace_all can corrupt the import line itself (e.g., turning import java.util.concurrent.locks.ReentrantLock; into import ReentrantLock;), which causes a cryptic checkstyle Range [0, -1) out of bounds for length N error, not a normal violation line. If you see that error, inspect the imports block first.

Commit and push

After checks pass, commit and push:

git add <files>
git commit -m "<message>"
git push -u origin <branch-name>

Branch strategy

  • Never work directly on master branch
  • If on master, create a new branch first: git checkout -b feature/<name> or git checkout -b fix/<name>

Create PR (if not yet created)

Check whether a PR already exists for the current branch:

gh pr view --json number 2>/dev/null

If no PR exists, create one:

PR title

Summarize the changes concisely. Examples:

  • Fix BanyanDB query timeout issue
  • Add support for OpenTelemetry metrics

PR description

Read .github/PULL_REQUEST_TEMPLATE and use its exact format with checkboxes. Do NOT use a custom summary format.

Key template sections — uncomment the relevant one:

For Bug Fixes:

### Fix <bug description or issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.

For New Features:

### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.

For Performance Improvements:

### Improve the performance of <class or module or ...>
- [ ] Add a benchmark for the improvement.
- [ ] The benchmark result.
- [ ] Links/URLs to the theory proof or discussion articles/blogs.

Always include:

- [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).

Create command

gh pr create --title "<title>" --body "$(cat <<'EOF'
<PR body from template>
EOF
)"

Post-creation

  • Add copilot as a reviewer: gh pr edit <number> --add-reviewer copilot
  • Do NOT add AI assistant as co-author. Code responsibility is on the committer's hands.
  • Return the PR URL when done.

After the PR is merged

Once the PR is merged, sync the default branch and clean up the feature branch:

# 1. Prune stale remote refs. GitHub auto-deletes the PR's branch on merge, so
#    the remote feature branch is usually already gone; --prune removes the
#    dangling local tracking ref.
git fetch origin --prune

# 2. Switch back to the default branch and fast-forward it to include the merge.
git checkout master
git pull --ff-only origin master

# 3. Confirm the change actually landed in master before deleting anything —
#    `git log --oneline -1` should show the merge/squash commit with the PR
#    number, or grep for a symbol the PR introduced.
git log --oneline -1

# 4. Delete the local feature branch. SkyWalking SQUASH-merges PRs, so the
#    feature branch's commit is NOT an ancestor of master (master gets a new
#    squash commit instead). `git branch -d` therefore reports "not fully
#    merged" — that is expected, not an error. After confirming the content is
#    in master (step 3), force-delete:
git branch -d <branch> 2>/dev/null || git branch -D <branch>

Notes:

  • git branch -d failing with "not fully merged" on a squash-merged PR is normal — the squash commit has a different SHA than the feature commit. Verify via step 3, then -D.
  • If the remote branch was not auto-deleted (some repo settings), remove it explicitly: git push origin --delete <branch>.
  • Do NOT skip step 3. Force-deleting a local branch whose work didn't actually merge loses it.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

ci-e2e-debug

無料概要あり

GitHub Actions のE2Eテストが失敗したとき、実行ログを取得して各コンポーネントのエラーを調べ、原因を整理するスキルです。

  • GitHub ActionsのE2E失敗を調べたいとき
  • OAPや各コンポーネントのログを確認したいとき
  • テスト用の別プロセスの失敗を追いたいとき
apache/skywalking2.5万2026年10月29日 更新

compile

無料概要あり

SkyWalking OAPサーバーのビルド、Javadoc検査、Checkstyleを実行し、PR提出前に変更がビルドやコード規約を満たすか確かめます。

  • PR前に全体ビルドを確認したいとき
  • Javadocのエラーを確認したいとき
  • 変更したモジュールだけをビルドしたいとき
apache/skywalking2.5万2026年10月29日 更新

generate-classes

無料概要あり

SkyWalkingのDSLスクリプトをコンパイルし、MAL・OAL・LAL・Hierarchyから生成されたクラスファイルを調査用に出力します。

  • MAL式の生成クラスを調べたいとき
  • OALのメトリクス関連クラスを確認したいとき
  • LALやHierarchyの出力を調査したいとき
apache/skywalking2.5万2026年10月29日 更新

license

無料概要あり

Apache 2.0のライセンスヘッダーと依存ライセンスを確認し、不備のあるヘッダーを修正します。PR提出前のライセンス確認に使うスキルです。

  • PR前にApacheライセンス表記を確認したいとき
  • 不足したライセンスヘッダーを直したいとき
  • 依存ライセンス一覧の差分を確認したいとき
apache/skywalking2.5万2026年10月29日 更新

new-monitoring-feature

無料概要あり

SkyWalking OAPに新しい監視対象を追加する際、信号に応じた拡張方法や設定・UI・ドキュメントの更新箇所を整理し、実装の道筋を示します。

  • 新しい監視対象を追加したいとき
  • メトリクスやログの拡張先を選びたいとき
  • Layer追加に伴う更新箇所を整理したいとき
apache/skywalking2.5万2026年10月29日 更新

package

無料概要あり

SkyWalkingの変更をテスト前に配布物とOAPのDockerイメージへ反映し、古いJARが残っていないか確認するビルド手順を案内します。

  • OAPの変更をDockerイメージに反映したいとき
  • E2Eテスト前にJARの更新を確認したいとき
  • 変更内容に合う再ビルド手順を選びたいとき
apache/skywalking2.5万2026年10月29日 更新

apache のスキルをすべて見る

このスキルの問題を報告する