Skip to content

Identify visual branding branch and add obsolete branch pruning script#26

Merged
divineforge merged 2 commits into
copilot/add-favicon-and-improve-brandingfrom
copilot/prune-obsolete-branches
Mar 25, 2026
Merged

Identify visual branding branch and add obsolete branch pruning script#26
divineforge merged 2 commits into
copilot/add-favicon-and-improve-brandingfrom
copilot/prune-obsolete-branches

Conversation

Copilot AI commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

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 into main on 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)

Branch Fate Last active
claude/add-blog-localization-eLZ0U Merged PR #13 2026-01-29
claude/add-post-publish-6mInv Stale, no PR 2026-01-26
claude/continue-todo-update-readme-e6L9n Merged PR #9 2026-01-25
claude/fix-mobile-menu-translations-xDsn3 Merged PR #12 2026-01-27
claude/plan-buddhist-blog-kvnuO Merged PR #8 2026-01-24
claude/sidebar-language-menu-6mInv Abandoned, no PR ~2026-01-26
codex/update-repo-for-english-focus-and-font-awesome Merged PR #15 2026-02-08
copilot/add-buddha-teachings-directory Merged PR #1 2025-10-28
copilot/configure-copilot-instructions Closed PR #3 (not merged) 2025-10-30
copilot/improve-visual-for-mobile Merged PR #22 2026-03-16
copilot/transform-gzen-into-philosophy-platform Merged PR #17 2026-03-16

Kept: 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.

bash scripts/prune-branches.sh --dry-run  # preview
bash scripts/prune-branches.sh            # delete all 11
git remote prune origin                   # clean local tracking refs

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
    • Triggering command: /usr/bin/gh gh auth status (http block)
  • https://api.github.com/repos/divineforge-com/gzen
    • Triggering command: /usr/bin/curl curl -s -o /dev/null -w %{http_code} -H Authorization: token ****** REDACTED (http block)
    • Triggering command: /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

check the latest branch where is the changes of the visual branding and colour improvement PR goes to?
help me to prune other branch that obsoleted more than 5 days ago


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Check visual branding and colour improvement changes Identify visual branding branch and add obsolete branch pruning script Mar 24, 2026
Copilot AI requested a review from divineforge March 24, 2026 23:15
@divineforge divineforge marked this pull request as ready for review March 25, 2026 14:09
Copilot AI review requested due to automatic review settings March 25, 2026 14:09
@divineforge divineforge merged commit 9d04007 into copilot/add-favicon-and-improve-branding Mar 25, 2026
@divineforge divineforge deleted the copilot/prune-obsolete-branches branch March 25, 2026 14:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh with a --dry-run mode 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.

Comment thread scripts/prune-branches.sh
Comment on lines +2 to +24
# 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=(

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread scripts/prune-branches.sh
Comment on lines +58 to +61
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

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment thread scripts/prune-branches.sh
Comment on lines +67 to +70
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}')"

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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"

Copilot uses AI. Check for mistakes.
Comment thread scripts/prune-branches.sh
Comment on lines +78 to +81
((DELETED++)) || true
else
echo "❌ failed (already deleted or permission denied)"
((FAILED++)) || true

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
((DELETED++)) || true
else
echo "❌ failed (already deleted or permission denied)"
((FAILED++)) || true
((++DELETED))
else
echo "❌ failed (already deleted or permission denied)"
((++FAILED))

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants