-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
github-branch-source-plugin 2.0.5
Problem
The regex
"^[0-9A-Za-z]([0-9A-Za-z._-]+[0-9A-Za-z])$"
that is used inĀ GitHubSCMSource is too restrictive. It doesn't allow one or two character names.
The check is for example used in PushGHEventSubscriber and silently prevents the triggering of Multibranch jobs.
Proposed Fix
A new regex should allow GitHub usernames like:
- a
- ab
- a-b
- a-b-c
And disallow usernames like:
- -
- –
- -a
- a-
- a--b
Replace the existing regex with the following:
"^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$"
- links to