Skip to content

Commit

Permalink
fix loadPrs for serverless
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikuni17 committed Nov 14, 2024
1 parent 9e2aacc commit d4593c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/common/github-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,11 @@ class GitHubService {
return pullRequests.map((pr) => {
return {
...pr,
// @ts-expect-error sadasd
labels: pr.labels.nodes,
labels: pr.labels?.nodes ?? [],
user: pr.author,
html_url: pr.url,
};
});
}) as any as PrItem[];
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/pages/release-notes/release-notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export const ReleaseNotes: FC<Props> = ({ version, onVersionChange, ignoredPrior
const loadPrs = useCallback(async () => {
setLoading(true);
setProgress(undefined);

if (version === 'serverless') {
setPrs(await github.getPrsForServerless(config));
setLoading(false);
setProgress(100);
return;
}

try {
subscriptionRef.current = (
await github.getPrsForVersion(
Expand Down

0 comments on commit d4593c4

Please sign in to comment.