From f89b77df6962cc6ba393e0f7d5bb712ed46cb8cb Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 13 Jun 2023 14:55:28 +0200 Subject: [PATCH] Release tooling: Use full git hash as we need the full oid for github api --- scripts/release/utils/get-github-info.ts | 8 +++++--- scripts/release/utils/get-unpicked-prs.ts | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/release/utils/get-github-info.ts b/scripts/release/utils/get-github-info.ts index 5a5d9e9cbe1a..c0fd7e7f67d1 100644 --- a/scripts/release/utils/get-github-info.ts +++ b/scripts/release/utils/get-github-info.ts @@ -74,7 +74,7 @@ function makeQuery(repos: ReposWithCommitsAndPRsToFetch) { } mergeCommit { commitUrl - abbreviatedOid + oid } }` ) @@ -84,6 +84,8 @@ function makeQuery(repos: ReposWithCommitsAndPRsToFetch) { .join('\n')} } `; + console.log(query); + return query; } @@ -285,11 +287,11 @@ export async function getPullInfoFromPullRequest(request: { user: user ? user.login : null, id: null, pull: request.pull, - commit: commit ? commit.abbreviatedOid : null, + commit: commit ? commit.oid : null, title: title || null, labels: data ? (data.labels.nodes || []).map((label: { name: string }) => label.name) : null, links: { - commit: commit ? `[\`${commit.abbreviatedOid}\`](${commit.commitUrl})` : null, + commit: commit ? `[\`${commit.oid}\`](${commit.commitUrl})` : null, pull: `[#${request.pull}](https://github.com/${request.repo}/pull/${request.pull})`, user: user ? `[@${user.login}](${user.url})` : null, }, diff --git a/scripts/release/utils/get-unpicked-prs.ts b/scripts/release/utils/get-unpicked-prs.ts index 2df259827253..bd8abeb57bc9 100644 --- a/scripts/release/utils/get-unpicked-prs.ts +++ b/scripts/release/utils/get-unpicked-prs.ts @@ -23,7 +23,7 @@ export async function getUnpickedPRs(baseBranch: string, verbose?: boolean): Pro title baseRefName mergeCommit { - abbreviatedOid + oid } labels(first: 20) { nodes { @@ -55,7 +55,7 @@ export async function getUnpickedPRs(baseBranch: string, verbose?: boolean): Pro id: node.id, branch: node.baseRefName, title: node.title, - mergeCommit: node.mergeCommit.abbreviatedOid, + mergeCommit: node.mergeCommit.oid, labels: node.labels.nodes.map((l: any) => l.name), }));