Skip to content

Commit

Permalink
Update add_label.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Jun 28, 2024
1 parent 8b91fac commit 2c6c776
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/add_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
const files = context.payload.pull_request
console.log(`Modified files on this PR: ${files}`)
const { execSync } = require('child_process')
const { commits } = context.payload.pull_request
const rawFiles = execSync(`git diff --name-only HEAD HEAD~${commits}`).toString()
const files = rawFiles.split('\n').filter(Boolean)
console.log(files)

0 comments on commit 2c6c776

Please sign in to comment.