mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 03:47:20 +00:00
fix: error fetch more history for release events (#1403)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
797a722244
commit
fc3c551a67
3 changed files with 11 additions and 3 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.
|
@ -95,9 +95,17 @@ export const getSHAForPushEvent = async (
|
|||
core.info('Repository is shallow, fetching more history...')
|
||||
|
||||
if (isTag) {
|
||||
const sourceBranch =
|
||||
github.context.payload.base_ref.replace('refs/heads/', '') ||
|
||||
github.context.payload.release?.target_commitish
|
||||
let sourceBranch = ''
|
||||
|
||||
if (github.context.payload.base_ref) {
|
||||
sourceBranch = github.context.payload.base_ref.replace(
|
||||
'refs/heads/',
|
||||
''
|
||||
)
|
||||
} else if (github.context.payload.release?.target_commitish) {
|
||||
sourceBranch = github.context.payload.release?.target_commitish
|
||||
}
|
||||
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
|
|
Loading…
Reference in a new issue