Skip to content

Commit

Permalink
Fix getting commit
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Antonio Osorio <[email protected]>
  • Loading branch information
JAORMX committed Dec 16, 2024
1 parent 9251f63 commit d1078f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/providers/github/properties/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func getReleaseWrapper(
return nil, fmt.Errorf("failed to fetch release: %w", fetchErr)
}

branch, commitSha, err := getBranchAndCommit(ctx, owner, repo, release.GetTagName(), ghCli)
branch, commitSha, err := getBranchAndCommit(ctx, owner, repo, release.GetTargetCommitish(), ghCli)
if err != nil {
return nil, fmt.Errorf("failed to get branch and commit SHA: %w", err)
}
Expand Down Expand Up @@ -145,7 +145,7 @@ func getBranchAndCommit(
return "", "", fmt.Errorf("failed to fetch branch: %w", err)
}

// The commitish is a commit SHA
// The commitish is a commit SHA without a branch
return "", commitish, nil
}

Expand Down

0 comments on commit d1078f4

Please sign in to comment.