mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
remove changelog check (#1495)
This commit is contained in:
parent
8277ea532c
commit
e08f68eade
3
.github/pull_request_template.md
vendored
Normal file
3
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<!--
|
||||
Remember to update the changelog for user facing changes.
|
||||
-->
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
Loading…
Reference in New Issue
Block a user