fix: handle error when trying to remove a label that does not exist
This commit is contained in:
@@ -83,12 +83,16 @@ jobs:
|
|||||||
PR_NUMBER: ${{ steps.finder.outputs.pr }}
|
PR_NUMBER: ${{ steps.finder.outputs.pr }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
github.rest.issues.removeLabel({
|
try {
|
||||||
issue_number: process.env.PR_NUMBER,
|
github.rest.issues.removeLabel({
|
||||||
owner: context.repo.owner,
|
issue_number: process.env.PR_NUMBER,
|
||||||
repo: context.repo.repo,
|
owner: context.repo.owner,
|
||||||
name: 'breaking change'
|
repo: context.repo.repo,
|
||||||
})
|
name: 'breaking change'
|
||||||
|
})
|
||||||
|
} catch () {
|
||||||
|
console.log('"breaking change" label does not exist on the PR.')
|
||||||
|
}
|
||||||
|
|
||||||
- name: Exit
|
- name: Exit
|
||||||
run: exit ${{ env.BREAKING_CHANGES_IS_BREAKING }}
|
run: exit ${{ env.BREAKING_CHANGES_IS_BREAKING }}
|
||||||
|
|||||||
Reference in New Issue
Block a user