fix: prevent similar commit hashes error when using the branch name (#1744)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
2139fa1b6f
commit
c634be959b
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@ -1012,7 +1012,7 @@ const getSHAForNonPullRequestEvent = (inputs, env, workingDirectory, isShallow,
|
||||
diff
|
||||
};
|
||||
}
|
||||
if (!previousSha) {
|
||||
if (!previousSha || previousSha === currentSha) {
|
||||
core.debug('Getting previous SHA...');
|
||||
if (inputs.since) {
|
||||
core.debug(`Getting base SHA for '${inputs.since}'...`);
|
||||
@ -1199,7 +1199,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
||||
((_u = (_t = github.context.payload.head) === null || _t === void 0 ? void 0 : _t.repo) === null || _u === void 0 ? void 0 : _u.fork) === 'true') {
|
||||
diff = '..';
|
||||
}
|
||||
if (!previousSha) {
|
||||
if (!previousSha || previousSha === currentSha) {
|
||||
if (inputs.sinceLastRemoteCommit) {
|
||||
previousSha = github.context.payload.before;
|
||||
if (!previousSha ||
|
||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -206,7 +206,7 @@ export const getSHAForNonPullRequestEvent = async (
|
||||
}
|
||||
}
|
||||
|
||||
if (!previousSha) {
|
||||
if (!previousSha || previousSha === currentSha) {
|
||||
core.debug('Getting previous SHA...')
|
||||
if (inputs.since) {
|
||||
core.debug(`Getting base SHA for '${inputs.since}'...`)
|
||||
@ -434,7 +434,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
diff = '..'
|
||||
}
|
||||
|
||||
if (!previousSha) {
|
||||
if (!previousSha || previousSha === currentSha) {
|
||||
if (inputs.sinceLastRemoteCommit) {
|
||||
previousSha = github.context.payload.before
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user