gitlab-branch-source-plugin
gitlab-branch-source-plugin copied to clipboard
Add trait to discard old tags/branches from discovering
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
- [x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests that demonstrate the feature works or the issue is fixed