Skip to content

Conversation

shashjar
Copy link
Member

Part of ID-125.

Follow-up to #98491.

Adds the installableOnly query param to OrganizationIntegrationReposEndpoint to determine whether or not to filter down integration repos returned. Default behavior (installableOnly not passed or passed as non-true) is to return all repos made available by the integration.

Copy link

linear bot commented Aug 28, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 28, 2025
@shashjar shashjar marked this pull request as ready for review August 28, 2025 22:25
@shashjar shashjar requested review from a team as code owners August 28, 2025 22:25
@shashjar shashjar requested a review from cathteng August 28, 2025 22:25
serialized_repositories = [
IntegrationRepository(
name=repo["name"],
identifier=repo["identifier"],
defaultBranch=repo.get("default_branch"),
)
for repo in repositories
if repo["identifier"] not in repo_names
if not installable_only or repo["identifier"] not in installed_repo_names
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this was a little hard for me to grok. Could we add a comment to explain?

@@ -65,14 +66,16 @@ def get(
except (IntegrationError, IdentityNotValid) as e:
return self.respond({"detail": str(e)}, status=400)

installable_only = request.GET.get("installableOnly", "false").lower() == "true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually if you are just passing a boolean query param, you can just check for the existence of the param to apply it

Suggested change
installable_only = request.GET.get("installableOnly", "false").lower() == "true"
installable_only = request.GET.get("installableOnly")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants