Implement Lingering potion & Area Effect Cloud #586
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Remove waiting label from PRs | |
on: | |
pull_request_target: | |
types: synchronize | |
jobs: | |
delabel: | |
name: Remove label | |
runs-on: ubuntu-latest | |
steps: | |
- name: Remove label | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ github.token }} | |
script: | | |
async function removeLabel(owner, repo, issue_number, name) { | |
try { | |
await github.rest.issues.removeLabel({ | |
owner: owner, | |
repo: repo, | |
issue_number: issue_number, | |
name: name, | |
}); | |
} catch (error) { | |
if (error.status === 404) { | |
//probably label wasn't set on the issue | |
console.log('Failed to remove label ' + name + ' (probably label isn\'t on the PR): ' + error.message); | |
} else { | |
throw error; | |
} | |
} | |
} | |
const [owner, repo] = context.payload.repository.full_name.split('/'); | |
removeLabel(owner, repo, context.payload.number, "Status: Waiting on Author"); | |
removeLabel(owner, repo, context.payload.number, "Stale"); |