From 5fbbada2fba1f5aa51c4f2e5e54eb83eeacfe4e6 Mon Sep 17 00:00:00 2001 From: Artturin Date: Tue, 17 Oct 2023 22:04:48 +0300 Subject: [PATCH] workflows/check-by-name: print failed command output --- .github/workflows/check-by-name.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-by-name.yml b/.github/workflows/check-by-name.yml index 90ab843839f6..9c46ecea6916 100644 --- a/.github/workflows/check-by-name.yml +++ b/.github/workflows/check-by-name.yml @@ -19,11 +19,13 @@ jobs: steps: - name: Resolving the merge commit run: | - if result=$(git ls-remote --exit-code ${{ github.event.pull_request.base.repo.clone_url }} refs/pull/${{ github.event.pull_request.number }}/merge); then + if result=$(git ls-remote --exit-code ${{ github.event.pull_request.base.repo.clone_url }} refs/pull/${{ github.event.pull_request.number }}/merge 2>&1); then mergedSha=$(cut -f1 <<< "$result") echo "The PR appears to not have any conflicts, checking the merge commit $mergedSha" else echo "The PR may have a merge conflict" + echo "'git ls-remote' output was:" + echo "$result" exit 1 fi echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"