Skip to content

Commit

Permalink
fix: html comment body only
Browse files Browse the repository at this point in the history
  • Loading branch information
robproject committed Oct 22, 2023
1 parent 416e1ce commit 4da8a75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,23 @@ 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'
uses: actions/github-script@v6
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,
Expand Down
3 changes: 2 additions & 1 deletion test_files/new_doctype_renamed_old.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
{
"fieldname": "new_docfield_2",
"fieldtype": "Int"
"fieldtype": "Int",
"label": "New Docfield 2"
},
{
"fieldname": "new_docfield_3",
Expand Down

0 comments on commit 4da8a75

Please sign in to comment.