mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
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:
parent
ce6e3a709c
commit
9632a2fa43
@ -18,7 +18,7 @@ contains_changelog () {
|
|||||||
|
|
||||||
is_dependabot_pr() {
|
is_dependabot_pr() {
|
||||||
local key gpg_dir
|
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)
|
key=$(mktemp)
|
||||||
cat > $key <<DEPENDABOT
|
cat > $key <<DEPENDABOT
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
@ -49,7 +49,7 @@ DEPENDABOT
|
|||||||
}
|
}
|
||||||
|
|
||||||
has_a_changelog() {
|
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
|
if contains_changelog $sha; then
|
||||||
echo "Commit $sha contains a changelog entry."
|
echo "Commit $sha contains a changelog entry."
|
||||||
return 0
|
return 0
|
||||||
@ -67,4 +67,6 @@ to your commit message.
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
has_a_changelog $1 || is_dependabot_pr $1
|
BASE=${1:-origin/master}
|
||||||
|
|
||||||
|
has_a_changelog $BASE || is_dependabot_pr $BASE
|
||||||
|
Loading…
Reference in New Issue
Block a user