[JENKINS-24091} Support for Git Plugin localBranch extension
- Fixing CodeNarc findings