Skip to content

Commit

Permalink
feat: use v2 pr/search (#16)
Browse files Browse the repository at this point in the history
* use v2 pr/search

* fix build
  • Loading branch information
bdougie authored Dec 21, 2023
1 parent 145e3f6 commit f1f78ff
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NEXT_PUBLIC_API_URL=https://api.opensauced.pizza/v1
NEXT_PUBLIC_V2_API_URL=https://beta.api.opensauced.pizza/v2
2 changes: 1 addition & 1 deletion .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ permissions:

jobs:
compliance:
uses: open-sauced/open-sauced/.github/workflows/compliance.yml@main
uses: open-sauced/hot/.github/workflows/compliance.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:

jobs:
test:
uses: open-sauced/open-sauced/.github/workflows/development.yml@main
uses: open-sauced/hot/.github/workflows/development.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
test:
name: Test and lint
uses: open-sauced/open-sauced/.github/workflows/development.yml@main
uses: open-sauced/hot/.github/workflows/development.yml@main

build:
name: Build application
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ on:

jobs:
assign:
uses: open-sauced/open-sauced/.github/workflows/triage.yml@main
uses: open-sauced/hot/.github/workflows/triage.yml@main
4 changes: 2 additions & 2 deletions hooks/useSWR.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Fetcher } from "swr";

const baseUrl = process.env.NEXT_PUBLIC_API_URL;
const baseUrl = process.env.NEXT_PUBLIC_V2_API_URL;

const apiFetcher: Fetcher = async (apiUrl: string) => {
const res = await fetch(`${baseUrl}/${apiUrl}`, { headers: { accept: "application/json" } });
Expand All @@ -17,4 +17,4 @@ const apiFetcher: Fetcher = async (apiUrl: string) => {
return res.json();
};

export default apiFetcher;
export default apiFetcher;
2 changes: 1 addition & 1 deletion pages/[owner]/[repo]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface PaginatedDataResponse {
const ChildWithSWR = (props: { owner: string; repo: string }) => {
const { owner, repo } = props;
const { data, error, mutate } = useSWR<PaginatedDataResponse, Error>(
`repos/${owner}/${repo}/contributions`
`prs/search?repo=${owner}%2F${repo}`
);

if (!data) {
Expand Down

0 comments on commit f1f78ff

Please sign in to comment.