mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-29 13:34:51 +00:00
fix: prevent similar commit hashes error when using the branch name (#1745)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
c634be959b
commit
da093c1609
3 changed files with 2 additions and 2 deletions
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
|
@ -184,7 +184,7 @@ export const getSHAForNonPullRequestEvent = async (
|
|||
currentBranch = currentBranchName
|
||||
}
|
||||
|
||||
if (previousSha && currentSha && currentBranch && targetBranch) {
|
||||
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
||||
if (previousSha === currentSha) {
|
||||
core.error(
|
||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||
|
@ -405,7 +405,7 @@ export const getSHAForPullRequestEvent = async (
|
|||
})
|
||||
let diff = '...'
|
||||
|
||||
if (previousSha && currentSha && currentBranch && targetBranch) {
|
||||
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
||||
if (previousSha === currentSha) {
|
||||
core.error(
|
||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||
|
|
Loading…
Reference in a new issue