Skip to content

Commit

Permalink
checkout out source and adding target as remote, generating html
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushik Malapati authored and Kaushik Malapati committed Dec 12, 2024
1 parent 7e7a9b0 commit bbcf6cd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/daff.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Daff
name: Comment Diff

on:
pull_request_target:
Expand All @@ -18,20 +18,27 @@ jobs:
shell: bash --login -eo pipefail {0}
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: install requirements
run: |
pip install --upgrade pip
pip install daff
- name: make diff
run: |
daff git csv
git diff origin/master..HEAD > ${{ runner.temp }}/diff.txt
git config set --global diff.daff-csv.command "daff diff --git --output-format html --fragment --context 0"
git remote add target https://github.com/pcdshub/pcds-nalms.git
git fetch target
git diff target/${{ github.event.pull_request.base.ref }}...HEAD Spreadsheet/ > ${{ runner.temp }}/diff.txt
- name: make comment
uses: thollander/actions-comment-pull-request@v3
with:
file-path: ${{ runner.temp }}/diff.txt
comment-tag: csvdiff

0 comments on commit bbcf6cd

Please sign in to comment.