fix(lint): resolve all lint errors in github search and settings UI
- Merge duplicate react imports in repository-selector - Use <dialog open> instead of role=dialog in settings popover - Export type re-export from source module in use-github-repo-search - Sort action args alphabetically in searchGithubRepositories - Disable react-compiler rule for synchronous setState in debounced search - Simplify getActiveGithubConnection query
This commit is contained in:
@@ -320,17 +320,15 @@ export const getActiveGithubConnection = internalQuery({
|
||||
.withIndex("by_organizationId", (q) =>
|
||||
q.eq("organizationId", args.organizationId)
|
||||
)
|
||||
.filter((q) =>
|
||||
q.and(
|
||||
q.eq(q.field("provider"), "github"),
|
||||
q.or(
|
||||
q.eq(q.field("state"), "active"),
|
||||
q.eq(q.field("state"), undefined)
|
||||
)
|
||||
)
|
||||
)
|
||||
.first();
|
||||
return connections ?? null;
|
||||
.filter((q) => q.eq(q.field("provider"), "github"))
|
||||
.collect();
|
||||
// Prefer an active connection; fall back to any GitHub connection.
|
||||
const active =
|
||||
connections.find((c) => c.state === "active") ??
|
||||
connections.find((c) => c.state === undefined) ??
|
||||
connections[0] ??
|
||||
null;
|
||||
return active;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -430,9 +430,9 @@ export interface GithubRepositorySearchResult {
|
||||
*/
|
||||
export const searchGithubRepositories = action({
|
||||
args: {
|
||||
query: v.string(),
|
||||
connectionId: v.optional(v.id("gitConnections")),
|
||||
perPage: v.optional(v.number()),
|
||||
query: v.string(),
|
||||
},
|
||||
handler: async (
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user