From 4da8a757fefc018dd55aeb56da4e6527cb72e213 Mon Sep 17 00:00:00 2001 From: Robert Duncan Date: Sat, 21 Oct 2023 21:36:25 -0700 Subject: [PATCH] fix: html comment body only --- .github/workflows/main.yaml | 5 ++++- test_files/new_doctype_renamed_old.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 18bed20..ede8637 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -26,12 +26,15 @@ jobs: - name: Diff run: | git --no-pager diff HEAD~1 HEAD > diff_output.txt + cat diff_output.txt - name: Convert ansi to html if: github.event_name == 'pull_request' run: | pip install ansi2html cat diff_output | ansi2html > diff_output.html + sudo apt install -y pup + pup 'body' < diff_output.html > body_content.html - name: Post comment if: github.event_name == 'pull_request' @@ -39,7 +42,7 @@ jobs: with: script: | const fs = require('fs'); - const output = fs.readFileSync('diff_output.html', 'utf8'); + const output = fs.readFileSync('body_content.html', 'utf8'); const issue_number = context.issue.number; github.rest.issues.createComment({ owner: context.repo.owner, diff --git a/test_files/new_doctype_renamed_old.json b/test_files/new_doctype_renamed_old.json index ee4f23d..73fde0c 100644 --- a/test_files/new_doctype_renamed_old.json +++ b/test_files/new_doctype_renamed_old.json @@ -22,7 +22,8 @@ }, { "fieldname": "new_docfield_2", - "fieldtype": "Int" + "fieldtype": "Int", + "label": "New Docfield 2" }, { "fieldname": "new_docfield_3",