From fbdee8c5e1339ddfe9ae7a1b7e7cc5b592469a55 Mon Sep 17 00:00:00 2001 From: Adrian Dombeck Date: Wed, 18 Mar 2026 11:54:34 +0100 Subject: [PATCH] gh-actions/build-debian: Fix malformed-contact Strip any string in square brackets from DEBFULLNAME and DEBEMAIL, because those cause lintian to complain with: malformed-contact Changed-By That happens when dependabot creates a PR, because it uses the author name "dependabot[bot]". --- gh-actions/common/build-debian/action.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gh-actions/common/build-debian/action.yaml b/gh-actions/common/build-debian/action.yaml index 08c371f..f527c12 100644 --- a/gh-actions/common/build-debian/action.yaml +++ b/gh-actions/common/build-debian/action.yaml @@ -132,9 +132,15 @@ runs: ) >> "${GITHUB_ENV}" if git status --porcelain &>/dev/null; then + DEBFULLNAME="$(git log -1 --format='%an' HEAD) - GH Action" + DEBEMAIL="$(git log -1 --format='%ae' HEAD)" + # Strip any string in square brackets, e.g. [bot], because those + # cause lintian to complain with "malformed-contact Changed-By". + DEBFULLNAME=$(echo "${DEBFULLNAME}" | sed 's/\[[^]]*\]//g') + DEBEMAIL=$(echo "${DEBEMAIL}" | sed 's/\[[^]]*\]//g') ( - echo DEBFULLNAME="$(git log -1 --format='%an' HEAD) - GH Action" - echo DEBEMAIL="$(git log -1 --format='%ae' HEAD)" + echo "DEBFULLNAME=${DEBFULLNAME}" + echo "DEBEMAIL=${DEBEMAIL}" ) >> "${GITHUB_ENV}" fi