You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env bash
|
|
|
|
# SPDX-FileCopyrightText: 2021 Foundation Devices, Inc. <hello@foundationdevices.com>
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
TEAM_PREFIX='PASS1'
|
|
|
|
commit_regex="^($TEAM_PREFIX-[0-9]+:\ )"
|
|
|
|
|
|
|
|
if ! `grep -iqE "$commit_regex" "$1"`; then
|
|
|
|
echo "=========================================================================================" >&2
|
|
|
|
echo "Aborting commit. Your commit message must start with a Linear issue ID, colon then space." >&2
|
|
|
|
echo "Example: '$TEAM_PREFIX-123: ' (To commit anyway, use the --no-verify option)" >&2
|
|
|
|
echo "=========================================================================================" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|