Add/remove label to/from pull request

Is it possible to add/remove labels to/from pull request via GitHub Actions? There is this action and one example shows how to add label to an issue. It is using octokit which is pretty straight forward. But I couldn’t find a way to do same for PRs. Is anybody having the same problem?

script: |
  github.issues.addLabels({...context.issue, labels: ['Triage']})

Found solution myself in GitHub API developer docs:

Every pull request is an issue, but not every issue is a pull request. For this reason, “shared” actions for both features, like manipulating assignees, labels and milestones, are provided within the Issues API.

1 Like