Using actions/importer-issue-ops Template and using multiple Runners with matrix strategy (ubuntu-latest
,selfhosted-runner
)
In the Cleanup step using below yml script to removeLabel
for an issue
.
- uses: actions/github-script@v6
if: always()
with:
script: |
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'actions-importer-running'
});
As we are using multiple runners the ubuntu-latest
runner code able to identify the label and deleting properly, whereas selfhosted-runner
failed to delete because it was already deleted by ubuntu-latest
.
Error message:
RequestError [HttpError]: Label does not exist
Error: Unhandled error: HttpError: Label does not exist
Trying to add condition to verify the label and deleting, looking for the solution to add some condition which will verify the label and initiate removeLabel
if exists.
Thanks in advance!
Tried octokit/rest.js and other available actions but couldn't solve the problem.