MCPcopy Create free account
hub / github.com/angular/dev-infra / addLabel

Function addLabel

github-actions/labeling/shared/labeling.ts:43–52  ·  view source on GitHub ↗

Add the provided label to the pull request.

(label: string)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected