Add the provided label to the pull request.
(label: string)
| 41 | |
| 42 | /** Add the provided label to the pull request. */ |
| 43 | async addLabel(label: string) { |
| 44 | const {number: issue_number, owner, repo} = context.issue; |
| 45 | try { |
| 46 | await this.git.issues.addLabels({repo, owner, issue_number, labels: [label]}); |
| 47 | core.info(`Added ${label} label to ${this.type} #${issue_number}`); |
| 48 | } catch (err) { |
| 49 | core.error(`Failed to add ${label} label to ${this.type} #${issue_number}`); |
| 50 | core.error(err as string); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | protected async setup() { |
| 55 | const auth = await utils.getAuthTokenFor(ANGULAR_ROBOT); |