mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
pr-remove-waiting-label: suppress failure on 404 errors
this usually means the label wasn't on the PR in the first place
This commit is contained in:
parent
5b72f202bf
commit
7460e12b6a
21
.github/workflows/pr-remove-waiting-label.yml
vendored
21
.github/workflows/pr-remove-waiting-label.yml
vendored
@ -16,9 +16,18 @@ jobs:
|
|||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
script: |
|
script: |
|
||||||
const [owner, repo] = context.payload.repository.full_name.split('/');
|
const [owner, repo] = context.payload.repository.full_name.split('/');
|
||||||
await github.rest.issues.removeLabel({
|
try {
|
||||||
owner: owner,
|
await github.rest.issues.removeLabel({
|
||||||
repo: repo,
|
owner: owner,
|
||||||
issue_number: context.payload.number,
|
repo: repo,
|
||||||
name: "Status: Waiting on Author",
|
issue_number: context.payload.number,
|
||||||
});
|
name: "Status: Waiting on Author",
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
if (error.status === 404) {
|
||||||
|
//probably label wasn't set on the issue
|
||||||
|
console.log('Failed to remove label (probably label isn\'t on the PR): ' + error.message);
|
||||||
|
} else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user