-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(github): fix variables initialization #3585
Conversation
9836e1c
to
c3bae90
Compare
self.github_conf_dir_path = "" | ||
self.github_org_security_file_path = "" | ||
self.github_branch_protection_rules_file_path = "" | ||
self.github_org_webhooks_file_path = "" | ||
self.github_repository_webhooks_file_path = "" | ||
self.github_repository_collaborators_file_path = "" | ||
super().__init__() |
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.
can you add a comment the init has to be at the end and also add or extend an existing UT to check some/all attributes are filled with something?
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.
Hi! thanks for the review :) I've added a test for this (all paths should be initialized even if not used)
Also, I moved the type declaration (by Nimrod's suggestion) to be in the class instead of the init method.
💪 🐶
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.
🐶
* vairables nulled after they are initiallized * vairables nulled after they are initiallized * changes to proper str typing in class * fis lint
* vairables nulled after they are initiallized * vairables nulled after they are initiallized * changes to proper str typing in class * fis lint
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
The initialization of the variables in the init of GitHub class is done before the type is set to string (by assigning the "" string). This caused to no checks at all from the GitHub framework (as no repo/account/rtc. are set in the first place)
Checklist: