Skip to content

Conversation

@ugrave
Copy link
Contributor

@ugrave ugrave commented Nov 17, 2025

To avoid cluttering Jenkins with old branches/tags, it can be useful to filter branches by the last commit time.
For this two new traits has been added, one for filtering branches and the other for tags.

The same functionality also exist for the bitbucket-branch-source plugin.
Credits are going to there implementation which i have adapted for gitlab.

Closes #523

Testing done

Test with a local running Jenkins and on-prem GitLab instance with a repo many old branches and tags.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@ugrave ugrave requested a review from jetersen as a code owner November 17, 2025 08:29
@jetersen
Copy link
Member

jetersen commented Dec 1, 2025

@ugrave https://github.com/jenkinsci/scm-filter-aged-refs-plugin I believe this should solve it or rather you should contribute the gitlab filter there?

An implementation already exist: jenkinsci/scm-filter-aged-refs-plugin#24

@ugrave
Copy link
Contributor Author

ugrave commented Dec 1, 2025

Looks like it does the same think. So i will go go with that plugin implementation.

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.

Discard old branches/tag from beeing discovering

2 participants