From 97a759263b5ec7b1393115d3984f8dfaed9d85b0 Mon Sep 17 00:00:00 2001 From: Tiago Santos Date: Thu, 15 Jun 2023 17:56:07 +0100 Subject: [PATCH] fix: correct commit url to support self-hosted ghe instance --- src/config.ts | 1 + src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index 85a91d4a..fdc5d6a9 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,6 +7,7 @@ export const Config = D.type({ INPUT_FILE_GLOB: D.string, INPUT_EVENT_NAME: D.string, INPUT_SPECTRAL_RULESET: D.string, + GITHUB_SERVER_URL: D.string, }); export type Config = D.TypeOf; diff --git a/src/index.ts b/src/index.ts index ba2829ef..e0438e28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -149,11 +149,11 @@ const program = pipe( annotations.findIndex(f => f.annotation_level === 'failure') === -1 ? 'success' : 'failure' ) ), - TE.map(({ checkResponse, repositoryInfo, annotations }) => { + TE.map(({ config, checkResponse, repositoryInfo, annotations }) => { checkResponse.map(res => { info(`Check run '${res.data.name}' concluded with '${res.data.conclusion}' (${res.data.html_url})`); info( - `Commit ${repositoryInfo.sha} has been annotated (https://github.com/${repositoryInfo.owner}/${repositoryInfo.repo}/commit/${repositoryInfo.sha})` + `Commit ${repositoryInfo.sha} has been annotated (${config.GITHUB_SERVER_URL}/${repositoryInfo.owner}/${repositoryInfo.repo}/commit/${repositoryInfo.sha})` ); });