-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e 2498 bug le filtre has good first issues de la liste projet ne (#1310)
* Returns live-ODHack issues in project/good-first-issues endpoint * Iso project_contributions_data * Add live_hackathon_issue_count to project_contributions_data * Add hasGfiOrLiveHackathonIssues query param to GET /projects * Fix project_contributions_data * Better index * Update dumps * Fix flakiness * Fix IT
- Loading branch information
Showing
10 changed files
with
100 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...s/db/changelog/changelogs/00000030_add_hackathon_issues_to_project_contributions_data.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
call drop_pseudo_projection('bi', 'project_contributions_data'); | ||
|
||
call create_pseudo_projection('bi', 'project_contributions_data', $$ | ||
SELECT p.id as project_id, | ||
count(distinct unnested.contributor_ids) as contributor_count, | ||
count(distinct cd.contribution_uuid) filter ( where cd.is_good_first_issue and | ||
coalesce(array_length(ccd.assignee_ids, 1), 0) = 0 and | ||
cd.contribution_status != 'COMPLETED' and | ||
cd.contribution_status != 'CANCELLED') as good_first_issue_count, | ||
count(distinct cd.contribution_uuid) filter ( where gl.id is not null and | ||
coalesce(array_length(ccd.assignee_ids, 1), 0) = 0 and | ||
cd.contribution_status != 'COMPLETED' and | ||
cd.contribution_status != 'CANCELLED') as live_hackathon_issue_count | ||
FROM projects p | ||
LEFT JOIN bi.p_contribution_data cd ON cd.project_id = p.id | ||
LEFT JOIN bi.p_contribution_contributors_data ccd ON ccd.contribution_uuid = cd.contribution_uuid | ||
LEFT JOIN unnest(ccd.contributor_ids) unnested(contributor_ids) ON true | ||
LEFT JOIN hackathon_projects hp ON hp.project_id = p.id | ||
LEFT JOIN hackathons h ON h.id = hp.hackathon_id AND | ||
h.status = 'PUBLISHED' AND | ||
h.start_date <= now() AND | ||
h.end_date >= now() | ||
LEFT JOIN indexer_exp.github_labels gl ON gl.name = any (h.github_labels) AND gl.id = any (cd.github_label_ids) | ||
GROUP BY p.id | ||
$$, 'project_id'); | ||
|
||
create unique index on bi.p_project_contributions_data (project_id, contributor_count, good_first_issue_count, live_hackathon_issue_count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters