trello_release_notes package¶
Submodules¶
trello_release_notes.trello_release_notes module¶
Main module.
-
class
trello_release_notes.trello_release_notes.
Trellist
(apikey, apisecret, boardname, done_list_name='done', releases_list_name='releases', create_release_if_zero_done=False, create_comments=True)[source]¶ Bases:
object
The main object - initialize and use run()
Parameters: - apikey – Your api-key.
- apisecret – Your api secret token. Get it from a protected file that you don’t commit. Keep it secret!
- boardname – Name of the board to work on.
- done_list_name – The name of the done list on your board. Only one.
- releases_list_name – The name of the list to put release cards on.
- create_comments – True by default. Create a comment on the release card for each done card
- create_release_if_zero_done – If nothing is done, should you make a sad empty release card?
-
add_comment_to_release
(release_card, card, comment_format='{card.name}\n{card.url}\n{card.description}')[source]¶ Parameters: - release_card – A card to comment on
- card – A card to summarize in a comment
- comment_format – The template, passed in the card.
-
create_release_card
(cards, release_template, card_summary_template)[source]¶ Returns a new release card, with a title from template and description based on a summary of the cards
Parameters: - cards – Cards in this release
- release_template – A format string for release card name that we pass in date and length of cards
- card_summary_template – A string we format with per each card
-
first
(iterable, condition)[source]¶ Iterates an iterable and returns the first item that meets a condition or None
Parameters: - iterable – An iterable to fetch the first itemm that meets condition
- condition – The condition to evaluate per item
-
get_board
(board_name)[source]¶ Gets the open board object by a name, otherwise raises an Error to let you know we don’t have that board
Parameters: board_name – actual name of a board you have access to
-
get_card_members
(card)[source]¶ Return an array of Trello.Member objects of this card
Parameters: card –
-
get_list_by_name
(name)[source]¶ Iterate lists and get the first one matching the name passed in
Parameters: name – Name of a list on the board you’ve passed in
-
get_member
[source]¶ Get a member. We only use our own function so that we can cache calls
Parameters: member_id –
-
prep_card
(card)[source]¶ Take the card and add arrays of all member initials, full_names and usernames for use in templates
Parameters: card – a card to modify with extra information
-
summarize_these
(cards, template, prep_function)[source]¶ Run a list of cards through a template and return those joined by newlines The template can reference any part of a Trello.card as well as 3 handy arrays - members_initials - members_full_names - members_usernames These will either have an empty string or an array of strings that show up nicely in string.format
Parameters: - cards – Card objects to summarize
- template – A template for each card. We pass the full card to format
- prep_function – A function that will add make the card more friendly to format
-
summarize_this
(card, template, prep_function)[source]¶ Summarize a card by passing it to a template after prepping it with values from a prep_function
Parameters: - card – a Card to summarize
- template – a string template. We’ll call format and pass in a prepped Card
- prep_function – use this to add extra information to the card
Module contents¶
Top-level package for Trello Release Notes.