-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ref(integrations): Decouple getting trees and code mapping #83705
Conversation
This is the ground work for other source code integrations to supporting searching for a file in the organization's SCM.
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #83705 +/- ##
===========================================
+ Coverage 51.82% 87.57% +35.74%
===========================================
Files 9554 9546 -8
Lines 541207 541401 +194
Branches 21331 21260 -71
===========================================
+ Hits 280485 474120 +193635
+ Misses 260367 66926 -193441
Partials 355 355 |
Bundle ReportChanges will increase total bundle size by 3.49kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
@@ -30,6 +30,7 @@ | |||
from sentry.integrations.models.organization_integration import OrganizationIntegration | |||
from sentry.integrations.services.repository import RpcRepository, repository_service | |||
from sentry.integrations.source_code_management.commit_context import CommitContextIntegration | |||
from sentry.integrations.source_code_management.repo_trees import RepoTreesIntegration |
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.
RepoTreesIntegration
will contain much code from the GitHub client without GitHub specific code.
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.
The code removed from this module belongs to getting the repo trees rather than creating the code mappings.
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.
Looks good!
Thanks @GabeVillalobos ! In response to Josh's comment. I spoke with him on Slack. I will merge this tomorrow. |
In #83705 we created a client which is not strongly coupled with the GitHub client. This change removes the old code.
In #83705 we created a client which is not strongly coupled with the GitHub client. This change removes the old code.
In #83705 we created a client not strongly coupled with the GitHub client. This change removes the old code.
The code to getting trees for repos (required for deriving code mappings) is strongly coupled with the GitHub client, thus, requiring making it hard to expand the feature to other integrations (upcoming work by the Ecosystem team). This makes the logic independent from the GitHub client. An option will control which code path to use, thus, a follow-up change will be required to deprecate the old code.
In #83705 we created a client not strongly coupled with the GitHub client. This change removes the old code.
The code to getting trees for repos (required for deriving code mappings) is strongly coupled with the GitHub client, thus, requiring making it hard to expand the feature to other integrations (upcoming work by the Ecosystem team). This makes the logic independent from the GitHub client. An option will control which code path to use, thus, a follow-up change will be required to deprecate the old code.
In #83705 we created a client not strongly coupled with the GitHub client. This change removes the old code.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
The code to getting trees for repos (required for deriving code mappings) is strongly coupled with the GitHub client, thus, requiring making it hard to expand the feature to other integrations (upcoming work by the Ecosystem team).
This makes the logic independent from the GitHub client.
An option will control which code path to use, thus, a follow-up change will be required to deprecate the old code.