Identify visual branding branch and add obsolete branch pruning script#26
Conversation
Co-authored-by: divineforge <1146195+divineforge@users.noreply.github.com> Agent-Logs-Url: https://github.com/divineforge-com/gzen/sessions/5f17694d-399a-4bcf-8576-abd5a1056914
There was a problem hiding this comment.
Pull request overview
Adds a one-off maintenance script to document where the recent visual branding refresh landed (PR #24) and to prune a predefined set of stale remote branches from origin.
Changes:
- Introduces
scripts/prune-branches.shwith a--dry-runmode and a hard-coded list of 11 obsolete branches to delete. - Embeds a short reference to the visual branding/colour improvement work (PR #24) in the script header/output.
| # prune-branches.sh — delete remote branches that are obsolete (merged or abandoned, > 5 days old) | ||
| # | ||
| # Visual branding & colour improvement changes: | ||
| # PR #24 — copilot/add-favicon-and-improve-branding | ||
| # Merged into main on 2026-03-24 | ||
| # Changes: favicon 善, GZen branding, Noto Sans SC, pastel theme, robots.txt, about page, ecosystem links | ||
| # | ||
| # Usage: | ||
| # bash scripts/prune-branches.sh | ||
| # bash scripts/prune-branches.sh --dry-run | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| DRY_RUN=false | ||
| if [[ "${1:-}" == "--dry-run" ]]; then | ||
| DRY_RUN=true | ||
| echo "🔍 DRY RUN — no branches will be deleted" | ||
| fi | ||
|
|
||
| REPO="divineforge-com/gzen" | ||
|
|
||
| # Branches obsolete as of 2026-03-24 (last commit > 5 days ago or already merged long ago) | ||
| OBSOLETE_BRANCHES=( |
There was a problem hiding this comment.
The script header/comments claim this deletes branches that are "> 5 days old", but the implementation deletes a hard-coded list and does not verify last activity/merge status. Either update the wording to reflect that it deletes a predefined list, or add an explicit age/merged check before deleting to prevent accidental removal if this script is reused later.
| DELETE_CMD="git push origin --delete" | ||
| if command -v gh &>/dev/null && gh auth status &>/dev/null 2>&1; then | ||
| DELETE_CMD="gh api --method DELETE repos/${REPO}/git/refs/heads" | ||
| fi |
There was a problem hiding this comment.
DELETE_CMD is set based on whether gh is available/authenticated, but it is never used (the loop always runs git push origin --delete). This dead code can confuse future maintenance; either remove DELETE_CMD/REPO/gh-check, or refactor the loop to actually use the selected delete command (and ensure the gh API path includes the branch ref).
| comment="${branch#*#}" | ||
| branch_name="${branch%% #*}" | ||
| # strip inline comment (bash arrays above use spaces, so just use the raw value) | ||
| branch_name="$(echo "$branch" | awk '{print $1}')" |
There was a problem hiding this comment.
The branch parsing here is inconsistent: comment is computed but unused, branch_name is derived twice, and the final awk extraction is unnecessary since each array element is already just the branch name. Simplify to use the array value directly (or explicitly encode comments in the array entries if you intend to parse them).
| comment="${branch#*#}" | |
| branch_name="${branch%% #*}" | |
| # strip inline comment (bash arrays above use spaces, so just use the raw value) | |
| branch_name="$(echo "$branch" | awk '{print $1}')" | |
| # Each OBSOLETE_BRANCHES entry is already just the branch name | |
| branch_name="$branch" |
| ((DELETED++)) || true | ||
| else | ||
| echo "❌ failed (already deleted or permission denied)" | ||
| ((FAILED++)) || true |
There was a problem hiding this comment.
The ((DELETED++)) || true / ((FAILED++)) || true pattern is only needed because set -e treats ((var++)) as failure when the pre-increment value is 0. Consider switching to ((++DELETED)) / ((++FAILED)) (or DELETED=$((DELETED+1))) to avoid the || true workaround and keep the control flow clearer.
| ((DELETED++)) || true | |
| else | |
| echo "❌ failed (already deleted or permission denied)" | |
| ((FAILED++)) || true | |
| ((++DELETED)) | |
| else | |
| echo "❌ failed (already deleted or permission denied)" | |
| ((++FAILED)) |
Answers where the visual branding/colour improvement changes landed, and provides a script to prune 11 stale remote branches older than 5 days.
Visual branding PR
PR #24 (
copilot/add-favicon-and-improve-branding) — merged intomainon 2026-03-24.Changes: favicon 善, Noto Sans SC, pastel theme
#fff8f5, saffron#e8956d, about page, robots.txt, ecosystem links.Obsolete branches (11 — all last active before 2026-03-19)
claude/add-blog-localization-eLZ0Uclaude/add-post-publish-6mInvclaude/continue-todo-update-readme-e6L9nclaude/fix-mobile-menu-translations-xDsn3claude/plan-buddhist-blog-kvnuOclaude/sidebar-language-menu-6mInvcodex/update-repo-for-english-focus-and-font-awesomecopilot/add-buddha-teachings-directorycopilot/configure-copilot-instructionscopilot/improve-visual-for-mobilecopilot/transform-gzen-into-philosophy-platformKept:
main, this branch,copilot/add-favicon-and-improve-branding(merged today),dependabot/npm_and_yarn/npm_and_yarn-35bee7da44(open PR #25).Cleanup script
Added
scripts/prune-branches.sh. Requires push access; run locally after merging.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh gh auth status(http block)https://api.github.com/repos/divineforge-com/gzen/usr/bin/curl curl -s -o /dev/null -w %{http_code} -H Authorization: token ****** REDACTED(http block)/usr/bin/curl curl -s -H Authorization: ****** REDACTED(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.