jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-68259] Cleanup of deleted branches and closed PRs does not happen automatically

Open
#1,392 4 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

When a multibranch pipeline job, the deleted branches and closed PRs get striked-out but they do no get removed automatically. This results in disk space being consumed for those obsolete branches and PRs. Orphaned Stategy is set as 'Discard old items' checked, with no values in 'Days to keep old items' or 'Max # of old items to keep'.

However, when I manually trigger "Scan Repository Now", all striked-out branches and PRs get removed.

Why are those branches/PRs not getting deleted instead of just being striked out ? How can the cleanup be handled automatically ?

---
Originally reported by richmond, imported from: Cleanup of deleted branches and closed PRs does not happen automatically


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 3
  • imported: 2025-12-02

Raw content of original issue

When a multibranch pipeline job, the deleted branches and closed PRs get striked-out but they do no get removed automatically. This results in disk space being consumed for those obsolete branches and PRs. Orphaned Stategy is set as 'Discard old items' checked, with no values in 'Days to keep old items' or 'Max # of old items to keep'.

However, when I manually trigger "Scan Repository Now", all striked-out branches and PRs get removed.

Why are those branches/PRs not getting deleted instead of just being striked out ? How can the cleanup be handled automatically ?

environment

```
Jenkins LTS 2.319.1

GitHub Branch Source 2.11.4
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.