Skip to content

Commit

Permalink
Make deployment link on pull request if CI is running on pull request
Browse files Browse the repository at this point in the history
This action has a bug where the deployment link doesn't show on pull request.
  • Loading branch information
nojvek committed Apr 27, 2021
1 parent 2d7bebd commit f730875
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ async function createGitHubDeployment(
environment: string,
description: string | undefined
): Promise<void> {
const {ref} = context
const deployRef = context.payload.pull_request?.head.sha ?? context.sha
const deployment = await githubClient.repos.createDeployment({
// eslint-disable-next-line @typescript-eslint/camelcase
auto_merge: false,
owner: context.repo.owner,
repo: context.repo.repo,
ref,
ref: deployRef,
environment,
description,
// eslint-disable-next-line @typescript-eslint/camelcase
Expand Down

0 comments on commit f730875

Please sign in to comment.