Skip to content

Commit

Permalink
Merge pull request #80 from open-sauced/beta
Browse files Browse the repository at this point in the history
chore: release 2.5.1
  • Loading branch information
brandonroberts committed Feb 6, 2024
2 parents 8156c6a + 9a8cfc4 commit 4ab7f0b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

> All notable changes to this project will be documented in this file
### [2.5.1-beta.1](https://github.com/open-sauced/opengraph.opensauced.pizza/compare/v2.5.0...v2.5.1-beta.1) (2024-02-01)


### 🐛 Bug Fixes

* fetch insight and insight repositories in parallel ([#79](https://github.com/open-sauced/opengraph.opensauced.pizza/issues/79)) ([e367547](https://github.com/open-sauced/opengraph.opensauced.pizza/commit/e3675470dcc0acb9cd2a978f01144240bf452b71))

## [2.5.0](https://github.com/open-sauced/opengraph.opensauced.pizza/compare/v2.4.1...v2.5.0) (2024-01-30)


Expand Down
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-sauced/opengraph.opensauced.pizza",
"version": "2.5.0",
"version": "2.5.1-beta.1",
"keywords": [],
"description": "OpenGraph dot Open Sauced is a general purpose social card generator",
"author": "Ahmed Mohamed Atwa <Ahmedatwa866@yahoo.com>",
Expand Down
2 changes: 1 addition & 1 deletion public/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/github/entities/db-insight.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface DbInsight {
repos: DbUserInsightRepo[];
}

interface DbUserInsightRepo {
export interface DbUserInsightRepo {
readonly id: number;
readonly insight_id: number;
readonly repo_id: number;
Expand Down
14 changes: 9 additions & 5 deletions src/social-card/insight-card/insight-card.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import tailwindConfig from "../templates/tailwind.config";
import { firstValueFrom } from "rxjs";

import { RequiresUpdateMeta } from "../user-card/user-card.service";
import { DbInsight } from "../../github/entities/db-insight.entity";
import { DbInsight, DbUserInsightRepo } from "../../github/entities/db-insight.entity";
import insightCardTemplate from "../templates/insight-card.template";
import insightRepos from "../templates/shared/insight-repos";
import insightContributors from "../templates/shared/insight-contributors";
Expand All @@ -34,12 +34,16 @@ export class InsightCardService {
private async getInsightData (insightId: number): Promise<InsightCardData> {
const maxRepoQueryIdsLenght = 10;

const insightPageReq = await firstValueFrom(
this.httpService.get<DbInsight>(`${process.env.API_BASE_URL!}/v2/insights/${insightId}`),
const insightPageApiReq = firstValueFrom(
this.httpService.get<DbInsight>(`${process.env.API_BASE_URL!}/v2/insights/${insightId}?include=none`),
);
const insightReposApiReq = firstValueFrom(
this.httpService.get<DbUserInsightRepo[]>(`${process.env.API_BASE_URL!}/v2/insights/${insightId}/repos`),
);
const [insightPageReq, insightReposReq] = await Promise.all([insightPageApiReq, insightReposApiReq]);

const { repos, name, updated_at } = insightPageReq.data;

const { name, updated_at } = insightPageReq.data;
const { data: repos } = insightReposReq;
const query = (new URLSearchParams);

query.set(
Expand Down

0 comments on commit 4ab7f0b

Please sign in to comment.