From: Michał Kępień Date: Wed, 24 Jun 2026 08:04:06 +0000 (+0200) Subject: Send Zulip notifications for autorebase failures X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dca92d738aef32ac1673f5906b77667082b40608;p=thirdparty%2Fbind9.git Send Zulip notifications for autorebase failures Use the GitLab-to-Zulip username map available in the BIND 9 QA repository to determine the Zulip username of the developer who happened to author a breaking base branch change, so that a Zulip notification can be triggered for that developer. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c67ccbae52..390a5694feb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2672,7 +2672,13 @@ merged-metadata: # Rebase failed; try applying recent commits from the base branch on top of the branch being rebased to determine which one introduces conflicts git rebase --rebase-merges "${CI_COMMIT_SHA}" "${BASE_COMMIT}" || true CONFLICT_COMMIT="$(git rev-parse REBASE_HEAD)" - CONFLICT_COMMIT_AUTHOR="$(git log --max-count=1 --pretty="@%al" "${CONFLICT_COMMIT}")" + CONFLICT_COMMIT_AUTHOR_LOGIN="$(git log --max-count=1 --pretty="%al" "${CONFLICT_COMMIT}")" + CONFLICT_COMMIT_AUTHOR_USERNAME="$(curl -m 5 -s "https://gitlab.isc.org/isc-projects/bind9-qa/-/raw/main/releng/users.json" | jq -r ".${CONFLICT_COMMIT_AUTHOR_LOGIN}" || :)" + if [ -n "${CONFLICT_COMMIT_AUTHOR_USERNAME}" ] && [ "${CONFLICT_COMMIT_AUTHOR_USERNAME}" != "null" ]; then + CONFLICT_COMMIT_AUTHOR="@**${CONFLICT_COMMIT_AUTHOR_USERNAME}**" + else + CONFLICT_COMMIT_AUTHOR="\`${CONFLICT_COMMIT_AUTHOR_LOGIN}\`" + fi CONFLICT_COMMIT_MERGE="$(git log --reverse --merges --pretty="%H" "${CONFLICT_COMMIT}..${BASE_COMMIT}" | head -1)" read -r CONFLICT_COMMIT_MERGE_REQUEST_PROJECT CONFLICT_COMMIT_MERGE_REQUEST_ID < <(git log --max-count=1 "${CONFLICT_COMMIT_MERGE}" | sed -n -E 's|^\s*See merge request ([a-z-]+/bind9)!([0-9]+).*|\1 \2|p' | head -1) REASON="merge conflict introduced by a change in the base branch"