pyjen.changeset module

Primitives for interacting with SCM changesets

class pyjen.changeset.Changeset(data, controller)[source]

Bases: object

manages the interpretation of the “changeSet” properties of a Jenkins build

See also

Build

Parameters:
  • data (dict) –

    Dictionary of data elements typically parsed from the “changeSet” node of a builds source data as provided by the Jenkins REST API. Should have at least the following keys:

    • ‘kind’ - string describing the SCM tool associated with this change all changes reported by this object are expected to be stored in the same SCM tool
    • ‘items’ - list of 0 or more actual changesets included in the associated build
  • controller (DataRequester) – object controlling access to Jenkins API
affected_items[source]

gets details of the changes associated with the parent build

Returns:list of 0 or more items detailing each change associated with this Changeset
Return type:list of ChangesetItem objects
has_changes[source]

Checks whether or not there are any SCM changes

Returns:True if changes have been found, False if not
Return type:bool
scm_type[source]

Gets the name of the SCM tool associated with this change

Returns:Name of the SCM tool associated with this change
Return type:str
class pyjen.changeset.ChangesetItem(data, controller)[source]

Bases: object

Encapsulates all info related to a single change in a Changeset

See also

Changeset

Parameters:
  • data (dict) – Dictionary of attributes describing this single changeset
  • controller (DataRequester) – Interface to the Jenkins API
author[source]
Returns:Person who committed this change to the associated SCM
Return type:User
message[source]
Returns:SCM commit message associated with this change
Return type:str