-
Notifications
You must be signed in to change notification settings - Fork 19
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
Mi/feature/merge #1153
Mi/feature/merge #1153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -1526,6 +1527,7 @@ def schedule_mi_workflow( | |||
"ENTITIES": entities, | |||
"KNOWLEDGE_PATH": knowledge_path, | |||
"MI_THOTH": "1" if mi_used_for_thoth else "0", | |||
"MI_MERGE": "1" if mi_merge else "0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hint: booleans are ints in python: str(int(mi_merge))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, I was just following other declarations in this file as well, see
common/thoth/common/openshift.py
Line 1368 in 5b96cd3
"THOTH_ADVISER_DEV": "1" if dev else "0", |
Can I then refactor these as e.g. "MI_MERGE": mi_merge
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hint: booleans are ints in python:
str(int(mi_merge))
ooh I get it now, you mean it's better to use casting than the ternary operator
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fridex The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Related Issues and Dependencies
Related to thoth-station/mi#364
This introduces a breaking change
This Pull Request implements
… Explain your changes.
Description