-
Notifications
You must be signed in to change notification settings - Fork 405
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: Move call to GitHub integration tasks out from trigger_feature_state_change_webhooks #3905
fix: Move call to GitHub integration tasks out from trigger_feature_state_change_webhooks #3905
Conversation
…tate_change_webhooks
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: api/features/tasks.py
Did you find this useful? React with a 👍 or 👎 |
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3905 +/- ##
==========================================
+ Coverage 95.92% 95.98% +0.05%
==========================================
Files 1134 1135 +1
Lines 35958 36141 +183
==========================================
+ Hits 34493 34689 +196
+ Misses 1465 1452 -13 ☔ View full report in Codecov by Sentry. |
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.
Left two comments. Also, the code needs test coverage.
api/features/models.py
Outdated
github_configuration = ( | ||
Organisation.objects.prefetch_related("github_config") | ||
.get(id=self.environment.project.organisation_id) | ||
.github_config.first() | ||
) |
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.
Err... what? Why not just:
github_configuration = ( | |
Organisation.objects.prefetch_related("github_config") | |
.get(id=self.environment.project.organisation_id) | |
.github_config.first() | |
) | |
github_configuration = ( | |
GithubConfig.objects.get(organisation_id=self.environment.project.organisation_id) | |
) |
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.
Long story, but basically I had issues with the soft-delete
model and the one-to-one
relationship and other things, but that complex query is not needed. Removed
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
How did you test this code?