Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rely on topic to set production creative status #61

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions odabot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def update_workflows(obj, dry_run, force, loop, pattern):

for project in requests.get(f'{gitlab_api_url}groups/{gitlab_gid}/projects?include_subgroups=yes&order_by=last_activity_at').json():

if re.match(pattern, project['name']) and 'live-workflow' in project['topics']:
if re.match(pattern, project['name']) and ('live-workflow' in project['topics'] or 'live-workflow-public' in project['topics']):
logger.info("%20s ago %s", project['name'], project['http_url_to_repo'])
logger.info("%20s", project['topics'])
logger.debug("%s", json.dumps(project))
Expand All @@ -515,6 +515,7 @@ def update_workflows(obj, dry_run, force, loop, pattern):
if dry_run:
logger.info("would deploy this workflow")
else:
creative_status = "production" if 'live-workflow-public' in project['topics'] else default_creative_status
workflow_update_status, deployment_info = update_workflow(last_commit,
last_commit_created_at,
project,
Expand All @@ -526,7 +527,7 @@ def update_workflows(obj, dry_run, force, loop, pattern):
cleanup=False if obj['debug'] else True,
gitlab_api_url=gitlab_api_url,
extra_emails=admin_emails,
creative_work_status=default_creative_status)
creative_work_status=creative_status)

logger.info('Workflow update status %s', workflow_update_status)
logger.info('Deployment info %s', deployment_info)
Expand Down
Loading