Merge pull request #87 from TriPSs/feature/pre-changelog-generation
fix: Fixed isShallow not working correctly anymorereleases/v3
commit
2f5c7bdaeb
|
@ -1,8 +1,5 @@
|
||||||
name: 'Test the action'
|
name: 'Test the action'
|
||||||
on:
|
on: [pull_request]
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-json:
|
test-json:
|
||||||
|
|
|
@ -119,14 +119,13 @@ module.exports = new (class Git {
|
||||||
* @return {Promise<>}
|
* @return {Promise<>}
|
||||||
*/
|
*/
|
||||||
isShallow = async() => {
|
isShallow = async() => {
|
||||||
const isShallow = await this.exec('rev-parse --is-shallow-repository')
|
if (ENV === 'dont-use-git') {
|
||||||
|
|
||||||
// isShallow does not return anything on local machine
|
|
||||||
if (isShallow) {
|
|
||||||
return isShallow.trim().replace('\n', '') === 'true'
|
|
||||||
} else {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isShallow = await this.exec('rev-parse --is-shallow-repository')
|
||||||
|
|
||||||
|
return isShallow.trim().replace('\n', '') === 'true'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,7 +154,6 @@ module.exports = new (class Git {
|
||||||
const expectedCommands = [
|
const expectedCommands = [
|
||||||
'git config user.name "Conventional Changelog Action"',
|
'git config user.name "Conventional Changelog Action"',
|
||||||
'git config user.email "conventional.changelog.action@github.com"',
|
'git config user.email "conventional.changelog.action@github.com"',
|
||||||
'git rev-parse --is-shallow-repository',
|
|
||||||
'git pull --tags --ff-only',
|
'git pull --tags --ff-only',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue