]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: Improve body parsing 5550/head
authorJeff Lucovsky <jeff@lucovsky.org>
Sat, 7 Nov 2020 12:55:19 +0000 (07:55 -0500)
committerJeff Lucovsky <jeff@lucovsky.org>
Sun, 8 Nov 2020 15:31:38 +0000 (10:31 -0500)
This commit improves handling of the PR body parsing to eliminate
unneeded characters.

.github/workflows/builds.yml

index ce9246119c47fb14e45a458cfc8d73f5d8b02bb1..85fd027a53409f5451792fed2ebf44bdd27a8e17 100644 (file)
@@ -40,7 +40,8 @@ jobs:
           PR_HREF: ${{ github.event.pull_request._links.self.href }}
         run: |
           if test "${PR_HREF}"; then
-              body=$(curl -s "${PR_HREF}" | jq -r .body)
+              body=$(curl -s "${PR_HREF}" | jq -r .body | tr -d '\r')
+
               libhtp_repo=$(echo "${body}" | awk '/^libhtp-repo/ { print $2 }')
               libhtp_branch=$(echo "${body}" | awk '/^libhtp-branch/ { print $2 }')
               libhtp_pr=$(echo "${body}" | awk '/^libhtp-pr/ { print $2 }')