Skip to content

Commit

Permalink
perf(platform/github): fetch PR from cache in reattemptPlatformAutomerge
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Kriese <[email protected]>
  • Loading branch information
straub and viceice authored Jan 16, 2024
1 parent 89227b7 commit 5de6b57
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/modules/platform/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1737,10 +1737,7 @@ export async function reattemptPlatformAutomerge({
platformOptions,
}: ReattemptPlatformAutomergeConfig): Promise<void> {
try {
const { body: ghPr } = await githubApi.getJson<GhRestPr>(
`repos/${config.parentRepo ?? config.repository}/pulls/${prNo}`,
);
const result = coerceRestPr(ghPr);
const result = getPr(prNo);
const { number, node_id } = result;

Check failure on line 1741 in lib/modules/platform/github/index.ts

View workflow job for this annotation

GitHub Actions / lint-other

Property 'number' does not exist on type 'Promise<GhPr | null>'.

Check failure on line 1741 in lib/modules/platform/github/index.ts

View workflow job for this annotation

GitHub Actions / lint-other

Property 'node_id' does not exist on type 'Promise<GhPr | null>'.

Check failure on line 1741 in lib/modules/platform/github/index.ts

View workflow job for this annotation

GitHub Actions / build

Property 'number' does not exist on type 'Promise<GhPr | null>'.

Check failure on line 1741 in lib/modules/platform/github/index.ts

View workflow job for this annotation

GitHub Actions / build

Property 'node_id' does not exist on type 'Promise<GhPr | null>'.

await tryPrAutomerge(number, node_id, platformOptions);
Expand Down

0 comments on commit 5de6b57

Please sign in to comment.