Skip to content

Separate in different steps #43

Separate in different steps

Separate in different steps #43

Workflow file for this run

name: Fuzzy CI
on:
push:
branches: [ try-sending-commant-via-gh-api ]
jobs:
comment:
name: Write a comment
runs-on: ubuntu-20.04
permissions:
issues: write
pull-requests: write
steps:
- name: Write HTTP body to file
env:
workflow_run: <workflow_run_id>
diff_id: <diff_id>
msg: Hi
# This PR introduces a change in some Merlin query response(s), which has been captured by the fuzzy-test CI. The fuzzy-test diffs of the CI have been approved. Info about the diffs that have been approved:
# - Distilled data:
# - Diff: https://github.com/pitag-ha/merlin/suites//artifacts/
# - Diff 256-sha: {{ steps.category_data_diff_hash.outputs.hash }}
# - Data on target branch (`master` at (...)): (...)
# - Data on PR merge branch, i.e. merge result of source branch (at (...)) and target branch: (...)
# - Full responses:
# - Diff: (...)
# - Diff 256-sha: my-full-responses-sha
# - Data on target branch (`master` at (...)): (...)
# - Data on PR merge branch, i.e. merge result of source branch (at (...)) and target branch: (...)
run: |
# body=$( echo "Hi" | jq -Rsa . )
body="Hi"
echo $body
jq -n --arg msg "$msg" '{ body: "Hiii" }' | tee -a body.json
# printf '{"body": "%s"}' "$body" | jq -Rsa . | tee -a body.json
- name: Cat file
run: cat body.json
- name: Write comment on PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -LsX POST -H "Authorization: Bearer $GITHUB_TOKEN" -d @body.json https://api.github.com/repos/pitag-ha/merlin/issues/6/comments
# echo "'{"body": "'"$body"'"}'"
echo $?
# run: |
# body=$(jq -Rsa . <<EOF
# This PR introduces a change in some Merlin query response(s), which has been captured by the fuzzy-test CI. The fuzzy-test diffs of the CI have been approved. Info about the diffs that have been approved:
# - Distilled data:
# - Diff: https://github.com/pitag-ha/merlin/suites/$workflow_run/artifacts/$diff_id
# - Diff 256-sha: {{ steps.category_data_diff_hash.outputs.hash }}
# - Data on target branch (\`master\` at (...)): (...)
# - Data on PR merge branch, i.e. merge result of source branch (at (...)) and target branch: (...)
# - Full responses:
# - Diff: (...)
# - Diff 256-sha: my-full-responses-sha
# - Data on target branch (\`master\` at (...)): (...)
# - Data on PR merge branch, i.e. merge result of source branch (at (...)) and target branch: (...)
# EOF
# )
# curl -LsX POST -H "Authorization: Bearer $GITHUB_TOKEN" -d '{"body": "'"$body"'"}' https://api.github.com/repos/pitag-ha/merlin/issues/6/comments
# echo $?