Skip to content

Commit

Permalink
get changes in lines of code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Nov 4, 2023
1 parent f0140a3 commit 6f2aecc
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/pilot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: List changed files
id: changes
run: |
changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
echo "::set-output name=files::$changed_files"
shell: bash

- name: Get added lines
- name: Display changed files
run: |
git fetch origin pull/${{ github.event.pull_request.number }}/merge
git diff HEAD...FETCH_HEAD --unified=0 > pr.diff
cat pr.diff
echo "Changed files:"
echo "${{ steps.changes.outputs.files }}"
shell: bash

- name: Get new file contents
id: file_contents
run: |
changed_files="${{ steps.changes.outputs.files }}"
for file in $changed_files; do
echo "Contents of $file:"
cat $file
done
shell: bash



0 comments on commit 6f2aecc

Please sign in to comment.