@@ -43,6 +43,7 @@ import {promptToInitiatePullRequestMerge} from './prompt-merge.js';
4343import { Prompt } from '../../utils/prompt.js' ;
4444import { glob } from 'fast-glob' ;
4545import { PnpmVersioning } from './pnpm-versioning.js' ;
46+ import { Commit } from '../../utils/git/octokit-types.js' ;
4647
4748/** Interface describing a Github repository. */
4849export interface GithubRepo {
@@ -150,11 +151,11 @@ export abstract class ReleaseAction {
150151 }
151152
152153 /** Gets the most recent commit of a specified branch. */
153- protected async getLatestCommitOfBranch ( branchName : string ) : Promise < string > {
154+ protected async getLatestCommitOfBranch ( branchName : string ) : Promise < Commit > {
154155 const {
155156 data : { commit} ,
156157 } = await this . git . github . repos . getBranch ( { ...this . git . remoteParams , branch : branchName } ) ;
157- return commit . sha ;
158+ return commit ;
158159 }
159160
160161 /** Checks whether the given revision is ahead to the base by the specified amount. */
@@ -560,7 +561,7 @@ export abstract class ReleaseAction {
560561 // Keep track of the commit where we started the staging process on. This will be used
561562 // later to ensure that no changes, except for the version bump have landed as part
562563 // of the staging time window (where the caretaker could accidentally land other stuff).
563- const beforeStagingSha = await this . getLatestCommitOfBranch ( stagingBranch ) ;
564+ const { sha : beforeStagingSha } = await this . getLatestCommitOfBranch ( stagingBranch ) ;
564565
565566 await this . assertPassingGithubStatus ( beforeStagingSha , stagingBranch ) ;
566567 await this . checkoutUpstreamBranch ( stagingBranch ) ;
@@ -703,7 +704,7 @@ export abstract class ReleaseAction {
703704 npmDistTag : NpmDistTag ,
704705 additionalOptions : { showAsLatestOnGitHub : boolean } ,
705706 ) {
706- const versionBumpCommitSha = await this . getLatestCommitOfBranch ( publishBranch ) ;
707+ const { sha : versionBumpCommitSha } = await this . getLatestCommitOfBranch ( publishBranch ) ;
707708
708709 // Ensure the latest commit in the publish branch is the bump commit.
709710 if ( ! ( await this . _isCommitForVersionStaging ( releaseNotes . version , versionBumpCommitSha ) ) ) {
0 commit comments