Merge pull request #87 from TriPSs/feature/pre-changelog-generation

fix: Fixed isShallow not working correctly anymore
releases/v3
Tycho Bokdam 2020-12-15 18:19:38 +01:00 committed by GitHub
commit 2f5c7bdaeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 11 deletions

View File

@ -1,8 +1,5 @@
name: 'Test the action'
on:
pull_request:
branches:
- master
on: [pull_request]
jobs:
test-json:

View File

@ -119,14 +119,13 @@ module.exports = new (class Git {
* @return {Promise<>}
*/
isShallow = async() => {
const isShallow = await this.exec('rev-parse --is-shallow-repository')
// isShallow does not return anything on local machine
if (isShallow) {
return isShallow.trim().replace('\n', '') === 'true'
} else {
if (ENV === 'dont-use-git') {
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 = [
'git config user.name "Conventional Changelog Action"',
'git config user.email "conventional.changelog.action@github.com"',
'git rev-parse --is-shallow-repository',
'git pull --tags --ff-only',
]