Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Add the productionOnly query parameter to search API - #383

Merged
noahingh merged 5 commits into
mainfrom
enhance-search-api
Apr 10, 2022
Merged

Add the productionOnly query parameter to search API#383
noahingh merged 5 commits into
mainfrom
enhance-search-api

Conversation

@noahingh

@noahinghnoahingh commented Mar 14, 2022

Copy link
Copy Markdown
Member

The productionOnly parameter is added to the API to retrieve only the deployments for the production environment. Related #382

@noahinghnoahingh added component: server This issue or pull request is related to the feature of the server-side enhancement New feature or request labels Mar 14, 2022
Comment on lines +44 to +49
s.Join(p).OnP(
sql.And(
sql.ColumnsEQ(p.C(perm.FieldRepoID), s.C(deployment.FieldRepoID)),
sql.EQ(p.C(perm.FieldUserID), u.ID),
),
)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

bugfix:

-- Returns deployments under the accessible repositoriesJOINON`perms`.`repo_id`=`deployments`.`repo_id`AND`perms`.`user_id`= ?

Comment on lines +113 to +116
// Or search deployments that were created between the start time and the end time.
index.Fields("created_at", "status"),

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Switch the fields to optimize the index

@noahinghnoahingh added this to the v0.7 milestone Mar 15, 2022
Comment on lines +105 to +106
From: from,
To: to,

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Move the way converting the format into the store package.

@noahingh
noahingh merged commit 21de3b2 into mainApr 10, 2022
@noahingh
noahingh deleted the enhance-search-api branch April 10, 2022 05:55
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

component: serverThis issue or pull request is related to the feature of the server-sideenhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@noahingh