Skip to content

Commit

Permalink
fix: correct commit url to support self-hosted ghe instance
Browse files Browse the repository at this point in the history
  • Loading branch information
tvcsantos committed Jun 15, 2023
1 parent 0e501e6 commit 97a7592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof Config>;
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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})`
);
});

Expand Down

0 comments on commit 97a7592

Please sign in to comment.