Skip to content

Commit

Permalink
feat: make fill_posts_list look into Published column
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyqu committed May 27, 2024
1 parent 1a0beca commit d21b23f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class TrelloListAlias(Enum):
TO_CHIEF_EDITOR = "trello_list_name__to_chief_editor"
PROOFREADING = "trello_list_name__proofreading"
DONE = "trello_list_name__typesetting"
PUBLISHED = "trello_list_name__published"
BACK_BURNER = "trello_list_name__back_burner"


Expand Down
4 changes: 3 additions & 1 deletion src/jobs/fill_posts_list_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def _execute(

registry_posts += FillPostsListJob._retrieve_cards_for_registry(
trello_client=app_context.trello_client,
list_aliases=(TrelloListAlias.PROOFREADING, TrelloListAlias.DONE),
list_aliases=[
TrelloListAlias.PUBLISHED
],
all_rubrics=all_rubrics,
errors=errors,
show_due=True,
Expand Down
4 changes: 4 additions & 0 deletions src/utils/card_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def is_author_missing(card: TrelloCard, app_context: AppContext) -> Tuple[bool,
TrelloListAlias.TO_CHIEF_EDITOR,
TrelloListAlias.PROOFREADING,
TrelloListAlias.DONE,
TrelloListAlias.PUBLISHED,
)
list_ids = app_context.trello_client.get_list_id_from_aliases(list_aliases)
return card.lst.id in list_ids, {}
Expand All @@ -75,6 +76,7 @@ def is_tag_missing(card: TrelloCard, app_context: AppContext) -> Tuple[bool, dic
TrelloListAlias.TO_CHIEF_EDITOR,
TrelloListAlias.PROOFREADING,
TrelloListAlias.DONE,
TrelloListAlias.PUBLISHED,
)
list_ids = app_context.trello_client.get_list_id_from_aliases(list_aliases)
return card.lst.id in list_ids, {}
Expand All @@ -89,6 +91,7 @@ def is_doc_missing(card: TrelloCard, app_context: AppContext) -> Tuple[bool, dic
TrelloListAlias.TO_CHIEF_EDITOR,
TrelloListAlias.PROOFREADING,
TrelloListAlias.DONE,
TrelloListAlias.PUBLISHED,
)
list_ids = app_context.trello_client.get_list_id_from_aliases(list_aliases)
if card.lst.id not in list_ids:
Expand All @@ -107,6 +110,7 @@ def has_no_doc_access(card: TrelloCard, app_context: AppContext) -> Tuple[bool,
TrelloListAlias.TO_CHIEF_EDITOR,
TrelloListAlias.PROOFREADING,
TrelloListAlias.DONE,
TrelloListAlias.PUBLISHED,
)
list_ids = app_context.trello_client.get_list_id_from_aliases(list_aliases)
if card.lst.id not in list_ids:
Expand Down

0 comments on commit d21b23f

Please sign in to comment.