You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/10/08 07:46:05 UTC
(skywalking-banyandb) 01/01: chore(repo): disable Dependabot, protect v0.11.x, and clean up merged branches in the PR skill
This is an automated email from the ASF dual-hosted git repository.
wu-sheng pushed a commit to branch chore/asf-dependabot-protect-v0.11.x
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit 59036a0a10271414374b222ed1016ebfc6f09fc6
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Oct 8 15:45:56 2026 +0800
chore(repo): disable Dependabot, protect v0.11.x, and clean up merged branches in the PR skill
- Turn off Dependabot security-update PRs via `dependabot_updates: false` in
`.asf.yaml`, matching every other SkyWalking repo. The bot was opening
npm bump PRs against `mcp/`, `canopy/` and `ui/` that are always closed.
- Add `v0.11.x` to the protected branches alongside `v0.7.x`.
- Extend the `gh-pull-request` skill with an "After the PR Is Merged"
section: confirm `MERGED` via `gh`, then delete the branch locally and on
`origin` and prune. Documents why `git branch -D` is needed in a
squash-only repo.
Co-Authored-By: Claude Fable 5.1 <no...@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuBEujVfGY9bsJJ5qkWzTH
---
.asf.yaml | 4 +++-
skills/gh-pull-request/SKILL.md | 31 +++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/.asf.yaml b/.asf.yaml
index c0a7bee33..36dac4c2e 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -33,6 +33,7 @@ github:
squash: true
merge: false
rebase: false
+ dependabot_updates: false
protected_branches:
main:
required_status_checks:
@@ -42,5 +43,6 @@ github:
required_pull_request_reviews:
dismiss_stale_reviews: true
required_approving_review_count: 1
- # Protect 0.7.x release branch
+ # Protect release branches
v0.7.x: {}
+ v0.11.x: {}
diff --git a/skills/gh-pull-request/SKILL.md b/skills/gh-pull-request/SKILL.md
index 1aa857ac3..3a1b7f408 100644
--- a/skills/gh-pull-request/SKILL.md
+++ b/skills/gh-pull-request/SKILL.md
@@ -106,3 +106,34 @@ gh pr create --title "<title>" --body "<body>"
```
Follow the standard PR format with a summary and test plan.
+
+## After the PR Is Merged
+
+Merged branches must be removed, both locally and on `origin`, so they do not pile up. Do this once the PR has actually been merged — never for an open PR, and never for a PR that was closed without merging unless the user asks.
+
+Confirm the merge state first:
+
+```bash
+gh pr view <number> --json state,mergedAt --jq '"\(.state) \(.mergedAt)"'
+```
+
+Only proceed when the state is `MERGED`. Then clean up:
+
+```bash
+git checkout main
+git pull --ff-only origin main
+git branch -D <branch-name>
+git push origin --delete <branch-name>
+git fetch --prune origin
+```
+
+Notes:
+
+- This repo only allows **squash** merges, so the squash commit on `main` never matches the branch's own commits. `git branch -d` therefore refuses to delete even a merged branch; `-D` is required, which is why the `MERGED` check above comes first.
+- If `git push origin --delete` reports `remote ref does not exist`, GitHub already removed the remote branch. That is fine; continue with `git fetch --prune`.
+- Also prune any other local branches whose upstream is already gone (earlier merged PRs). List them, confirm with the user that each was merged, then delete:
+
+ ```bash
+ git fetch --prune origin
+ git branch -vv | grep ': gone\]' | awk '{print $1}'
+ ```