PaloAltoNetworks / panhandler

Panhandler is a tool to manage config snippets and Skillets for PAN-OS devices
Apache License 2.0
41 stars 19 forks source link

panhandler unable to checkout branches with '-' in the name #113

Closed scotchoaf closed 4 years ago

scotchoaf commented 4 years ago

after testing have discovered that branches with a hyphen are ignored when attempting to checkout in panHandler. move to '_' and works as expected.

This impacts both the checkout and the top of page url link to the branch-specific site

scotchoaf commented 4 years ago

or not sure if spring.paloaltonetwork specific. Had to rename a branch without hyphen to checkout. appears to work with other repos outside of spring

even with the underscore the url link only goes to master

nembery commented 4 years ago

just tested this on local ph and it works fine even on spring site

url link only worked for github as different git implementations have different URL schemes. We can detect if the remote has the string 'github' in it and format the link appropriately, otherwise, we can't guess the URL scheme. For example, gitlab, gogs, and gitea may all have different url schemes to http link to a branch.

however, as a hack, I added an extra check for spring.palo in the url and formatted the link appropriately