Open krutcha opened 5 months ago
just incase it helps, I am able to get the branch name as follows w/o throwing an exception:
element_tree = job._get_config_element_tree()
#ET.dump(element_tree)
for property in element_tree.iter():
if property.tag == "hudson.plugins.git.BranchSpec":
branch = property.find("name").text
ISSUE TYPE
Bug Report
Jenkinsapi VERSION
0.3.13
Jenkins VERSION
2.440.3
SUMMARY
on Build class, get_revision() works, however get_revision_branch() fails in get_revision_type() with jenkinsapi.custom_exceptions.NotSupportSCM: SCM class "None" not supported by API
EXPECTED RESULTS
get_scm__branch returns a branch name from github
ACTUAL RESULTS
jenkinsapi.custom_exceptions.NotSupportSCM: SCM class "None" not supported by API
USEFUL INFORMATION
pipeline type is 'pipeline script from SCM' SCM:git (a gitub instance)