fix check-changelog (#7419)

In #7386 I inadvertently removed the default value for the argument
`check-changelog.sh` takes. This did not break CI because CI always
passes the argument explicitly, but it did break local workflows for
some developers.

Apologies.

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Gary Verhaegen 2020-09-16 15:19:37 +02:00 committed by GitHub
parent ce6e3a709c
commit 9632a2fa43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ contains_changelog () {
is_dependabot_pr() {
local key gpg_dir
if [ "1" = "$(git rev-list ${1:-origin/master}.. | wc -l)" ] && [ "dependabot[bot]" = "$(git show -s --format=%an)" ]; then
if [ "1" = "$(git rev-list $1.. | wc -l)" ] && [ "dependabot[bot]" = "$(git show -s --format=%an)" ]; then
key=$(mktemp)
cat > $key <<DEPENDABOT
-----BEGIN PGP PUBLIC KEY BLOCK-----
@ -49,7 +49,7 @@ DEPENDABOT
}
has_a_changelog() {
for sha in $(git rev-list ${1:-origin/master}..); do
for sha in $(git rev-list $1..); do
if contains_changelog $sha; then
echo "Commit $sha contains a changelog entry."
return 0
@ -67,4 +67,6 @@ to your commit message.
return 1
}
has_a_changelog $1 || is_dependabot_pr $1
BASE=${1:-origin/master}
has_a_changelog $BASE || is_dependabot_pr $BASE