DirectoryChanGo¶
- class chango.concrete.DirectoryChanGo(change_note_type, version_note_type, version_history_type, scanner, directory_format='{uid}_{date}')¶
Bases:
ChanGo[DirectoryVersionScanner,VHT,VNT,CNT],GenericImplementation of the
ChanGointerface that works withDirectoryVersionScannerand assumes that change notes are stored in subdirectories named after the version identifier.- Parameters:
change_note_type (
type) – The type of change notes to load. Must be a subclass ofChangeNote.version_note_type (
type) – The type of version notes to load. Must be a subclass ofVersionNote.version_history_type (
type) – The type of version histories to load. Must be a subclass ofVersionHistory.scanner (
DirectoryVersionScanner) – The version scanner to use.directory_format (
str, optional) – Reverse ofDirectoryVersionScannerdirectory_pattern. Must be a string that can be used withstr.format()and contain at least one named fielduidfor the version identifier and optionally a second named fielddatefor the date of the version release in ISO format. The default value is compatible with the default value ofDirectoryVersionScannerdirectory_pattern.
- directory_format¶
The format string used to create version directories.
- Type:
str
- build_github_event_change_note(event, data=None)¶
Implementation of
build_github_event_change_note().Important
By default, this will always call
chango.abc.ChangeNote.build_from_github_event()and does not check if a new change note is necessary. The only exception is whenchange_note_typeis a subclass ofSectionChangeNote:If there already is a change note for the current pull request, it is updated with the new information. If nothing changed, returns
None.If the
dataparameter is an instance ofChanGoActionDatawith a parent pull request, then this method will try to find an existing unreleased change note for the parent pull request and append the new information to it.
- build_version_note(version)¶
Implementation of
build_version_note(). Includes special handling forSectionVersionNote, which has the required argumentsection_change_note_type.