remove changelog check (#1495)

This commit is contained in:
Nick Snyder 2018-12-18 13:35:56 -08:00 committed by GitHub
parent 8277ea532c
commit e08f68eade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 42 deletions

3
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,3 @@
<!--
Remember to update the changelog for user facing changes.
-->

View File

@ -15,7 +15,6 @@ go env
./todo-security.sh
./no-localhost-guard.sh
./bash-syntax.sh
./require-changelog.sh
# TODO(sqs): Reenable this check when about.sourcegraph.com is reliable. Most failures come from its
# downtime, not from broken URLs.

View File

@ -1,41 +0,0 @@
#!/bin/bash
echo "--- require changelog"
set -x
if [ "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" != "master" ]; then
set +x
echo "CHANGELOG.md entry not required since this isn't a pull request into master"
exit 0
fi
git fetch origin master
changed_files=$(git diff --name-only origin/master...)
# If the changed files don't match any of these regular expressions
# then no changelog entry is required.
if ! echo "${changed_files}" | grep -qE -e '(cmd|pkg|schema)/.*\.go$' -e '(shared|web)/.*\.(tsx?|json)$'; then
set +x
echo "CHANGELOG.md entry not required for these file changes"
exit 0
fi
if echo "${changed_files}" | grep -q '^CHANGELOG\.md$'; then
set +x
echo "CHANGELOG.md entry found"
exit 0
fi
if git log origin/master... --pretty=format:%B | grep -q NOCHANGELOG; then
set +x
echo "Found NOCHANGELOG in commit message so no CHANGELOG.md entry is required"
exit 0
fi
set +x
echo "Changes that impact customers require an entry in CHANGELOG.md."
echo "If a changelog entry is not appropriate for this change then include NOCHANGELOG in any commit message on your branch."
echo "git commit --allow-empty -m NOCHANGELOG"
exit 1