Skip to content

Commit 23f13fb

Browse files
authored
Github organization enrichment: name sanitization (#296)
1 parent 4e2fcbe commit 23f13fb

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
create unique index organization_caches_url
2+
on "organizationCaches" (url);
3+
4+
drop index public.organization_caches_name;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
create unique index organization_caches_name
2+
on "organizationCaches" (name);
3+
4+
drop index public.organization_caches_url;

backend/src/serverless/integrations/usecases/github/graphql/organizations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const getOrganization = async (name: string, token: string): Promise<any> => {
1616
},
1717
})
1818

19-
const sanitizedName = name.replaceAll('\\', '')
19+
const sanitizedName = name.replaceAll('\\', '').replaceAll('"', '')
2020

2121
const organizationsQuery = `{
2222
search(query: "type:org ${sanitizedName}", type: USER, first: 10) {

0 commit comments

Comments
 (0)