Skip to content

Commit

Permalink
Update Bot information only if git email currently unset
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Sep 16, 2024
1 parent 29f1a6e commit 66d77c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 6 additions & 3 deletions build-scripts/patches/moonray/apply
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

DIR="$(realpath "$(dirname "${0}")")"

# Configure git author
git config user.email k8s-bot@canonical.com
git config user.name k8s-bot
# Configure git author if unset
git_email=$(git config user.email)
if [ -z "${git_email}" ]; then
git config user.email k8s-team-ci@canonical.com
git config user.name 'k8s-team-ci (CDK Bot)'
fi

# Remove unrelated tests
rm "${DIR}/../../../tests/integration/tests/test_cilium_e2e.py"
Expand Down
7 changes: 5 additions & 2 deletions build-scripts/patches/strict/apply
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
DIR="$(realpath "$(dirname "${0}")")"

# Configure git author
git config user.email k8s-bot@canonical.com
git config user.name k8s-bot
git_email=$(git config user.email)
if [ -z "${git_email}" ]; then
git config user.email k8s-team-ci@canonical.com
git config user.name 'k8s-team-ci (CDK Bot)'
fi

# Apply strict patch
git am "${DIR}/0001-Strict-patch.patch"

0 comments on commit 66d77c4

Please sign in to comment.