원클릭으로
gh-pull-request
// 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.
// 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.
Add a new monitoring target / layer to SkyWalking OAP. Orients you to the OAL / MAL / LAL / SpanListener / SegmentListener extension points, the UI template + submodule touchpoints, the docs set that must move together, and the cross-cutting traps that don't live in any one skill.
Run SkyWalking E2E tests locally
Rebuild the SkyWalking distribution and OAP Docker image after source changes. Use before running e2e tests so the image reflects your code changes. Avoids the "image looks updated but runtime has stale jars" trap.
Download and inspect CI e2e test logs from GitHub Actions artifacts. Use when investigating e2e test failures in CI.
Generate bytecode classes from DSL scripts (MAL, OAL, LAL, Hierarchy). Runs the compiler and dumps .class files for inspection.
Build SkyWalking OAP server, run javadoc checks, and verify checkstyle. Use to validate changes before submitting a PR.
| name | gh-pull-request |
| description | 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. |
Run pre-flight checks, commit, push, and optionally create a PR.
Run these checks before every commit+push and fix any failures:
# 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
license-eye header check
If invalid files are found, fix with license-eye header fix and re-check.
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):
{@link} where the short name would be ambiguous to the reader.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.
After checks pass, commit and push:
git add <files>
git commit -m "<message>"
git push -u origin <branch-name>
git checkout -b feature/<name> or git checkout -b fix/<name>Check whether a PR already exists for the current branch:
gh pr view --json number 2>/dev/null
If no PR exists, create one:
Summarize the changes concisely. Examples:
Fix BanyanDB query timeout issueAdd support for OpenTelemetry metricsRead .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).
gh pr create --title "<title>" --body "$(cat <<'EOF'
<PR body from template>
EOF
)"
copilot as a reviewer: gh pr edit <number> --add-reviewer copilot