From c9d4f55af38b78f9e9c28b943c45b378c0f5a63e Mon Sep 17 00:00:00 2001 From: Sonja Heinze Date: Fri, 17 Nov 2023 12:47:14 +0100 Subject: [PATCH] Read comment --- .github/workflows/parse_comment.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/parse_comment.yml diff --git a/.github/workflows/parse_comment.yml b/.github/workflows/parse_comment.yml new file mode 100644 index 0000000000..50895f7674 --- /dev/null +++ b/.github/workflows/parse_comment.yml @@ -0,0 +1,19 @@ +name: Fuzzy CI + +on: + push: + branches: [ read-and-parse-comment ] + # pull_request: + # branches: [ fuzzy-ci-artefacts-approach ] + # types: [ opened, synchronize, reopened, unlabeled, labeled ] + +jobs: + all: + name: Read and parse comment + runs-on: ubuntu-20.04 + steps: + - name: Get body of last approval comment on PR + env: + msg_start: "This PR introduces a change in some Merlin query response(s), which has been captured by the fuzzy-test CI." + run: | + curl -s "https://api.github.com/repos/pitag-ha/merlin/issues/6/comments" | jq -r --arg msg_start "$msg_start" 'map(select(.body | startswith($msg_start))) | max_by(.'created_by') | .body'