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 0063ac2 commit 3d90fef
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/add_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,13 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- uses: snnaplab/get-labels-action@v1
- uses: rogerluan/[email protected]
with:
github_token: ${{ secrets.github_token }}

- uses: actions/github-script@v7
with:
script: |
const currentLabels = JSON.parse(process.env.LABELS)
if (currentLabels.length > 0) {
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: currentLabels
})
}
console.log(currentLabels)
const { execSync } = require('child_process')
const { commits } = context.payload.pull_request
const rawFiles = execSync(`git diff --name-only HEAD HEAD~${commits}`).toString()
Expand Down

0 comments on commit 3d90fef

Please sign in to comment.