Skip to content

Commit

Permalink
Merge pull request #16522 from swarajsaaj/fix-actions-v5-breaking
Browse files Browse the repository at this point in the history
Fix triage and cleanup labeler actions
  • Loading branch information
DanielFran authored Oct 2, 2021
2 parents 16160d4 + b10b0cc commit 7020c11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/label-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = { owner: context.issue.owner, repo: context.issue.repo, issue_number: context.issue.number }
github.issues.listLabelsOnIssue({...issue}).then(response => {
github.rest.issues.listLabelsOnIssue({...issue}).then(response => {
const labels = response.data
for (const label of labels) {
if (label.name == 'area: needs-reproduction' || label.name == 'area: waiting for information' || label.name.includes('status: ')) {
github.issues.removeLabel({...issue, name: label.name})
github.rest.issues.removeLabel({...issue, name: label.name})
}
}
})
4 changes: 2 additions & 2 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = { owner: context.issue.owner, repo: context.issue.repo, issue_number: context.issue.number }
github.issues.listLabelsOnIssue({...issue}).then(response => {
github.rest.issues.listLabelsOnIssue({...issue}).then(response => {
const labels = response.data
let missingLabel = [], missingArea = true, missingTheme = true
for (const label of labels) {
Expand All @@ -47,6 +47,6 @@ jobs:
missingLabel.push('theme: undefined')
}
if (missingArea || missingTheme) {
github.issues.addLabels({...issue, labels: missingLabel})
github.rest.issues.addLabels({...issue, labels: missingLabel})
}
})

0 comments on commit 7020c11

Please sign in to comment.