Skip to content

#9418 – reduce the number of branches#9433

Closed
Copilot wants to merge 2 commits into
masterfrom
copilot/reduce-number-of-branches
Closed

#9418 – reduce the number of branches#9433
Copilot wants to merge 2 commits into
masterfrom
copilot/reduce-number-of-branches

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

How the feature works? / How did you fix the issue?

The repository has accumulated a large number of public branches, many of which are likely already merged. This change adds repository-side cleanup so merged same-repo feature branches do not continue to pile up, while preserving active long-lived branches.

  • Automatic cleanup on merge

    • Adds a workflow that runs when a pull request is closed.
    • If the PR was merged and its source branch belongs to this repository, the workflow deletes that branch automatically.
  • Scheduled cleanup for existing merged branches

    • Adds a weekly/manual cleanup job to remove already-merged remote branches.
    • The cleanup walks branches merged into the default branch and deletes only safe candidates.
  • Safety guards

    • Never deletes the default branch.
    • Never deletes release/* branches.
    • Skips fork branches by requiring the PR head repository to match the current repository.
    • Tolerates already-removed or non-deletable branches without failing the workflow.
if: >
  github.event.pull_request.merged == true &&
  github.event.pull_request.head.repo.full_name == github.repository &&
  github.event.pull_request.head.ref != github.event.repository.default_branch &&
  !startsWith(github.event.pull_request.head.ref, 'release/')

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

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:

  • lifescience.opensource.epam.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>suggestion: reduce the number of branches</issue_title>
<issue_description>While writing, there are 674 branches pushed to the public GitHub instance of the blessed repository. I speculate some/many of them are feature branches already merged into the repository's default branch, which would allow to reduce the overall number to only a few, perhaps in favour of couple additional tags (if deemed necessary).

This came to my mind in a follow up to a discussion about InChIs (link) when I noticed the project's demo page currently uses version 3.9.0-rc.1 by 2025-10-02 while the landing page of the ketcher mentions version 3.12.0 of 2026-03-04 as the most recent one.

</issue_description>

Comments on the Issue (you are @copilot in this section)


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

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copilot AI changed the title [WIP] [IUPAC-204] Suggestion to reduce the number of branches #9418 – reduce the number of branches Mar 12, 2026
Copilot AI requested a review from AlexeyGirin March 12, 2026 20:54
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.

suggestion: reduce the number of branches

2 participants