Skip to content

Jenkins build response data has 'changeSets' as a list, but build.get_changeset_items() is expecting a dict #748

Closed
@decimalst

Description

@decimalst

ISSUE TYPE

Bug Report

Jenkinsapi VERSION

  • 0.3.10

Jenkins VERSION

  • 2.150.3

SUMMARY

Jenkins API is returning
Experiencing an issue while attempting to use the get_changeset_items() method.
The relevant lines are here:

elif 'changeSets' in self._data:
if 'items' in self._data['changeSets']:
return self._data['changeSets']['items']

It appears that self._data['changeSets'] is a list rather than a dict, so checking if 'items' is in it will not return true.

EXPECTED RESULTS

I'd expect that the method would return the changeset items for the build.

ACTUAL RESULTS

An empty list is returned.

USEFUL INFORMATION

Picture of type returned in the build._data:
Screen Shot 2019-11-08 at 2 58 54 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues not active for more than 30 days

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions