NEW: Add review request in addition to labeling
const regex = new RegExp(team + '[^\-]|' + team + '$');
let result = regex.test(text);
if (result) {
- label = team.replace("@conda-forge/help-", "");
- label_no_staged = label.replace("@conda-forge/", "");
+ const slug = team.replace("@conda-forge/", "");
+ const label = slug.replace("help-", "");
found_label = true;
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
- labels: [label_no_staged, 'review-requested']
+ labels: [label, 'review-requested']
+ });
+ github.rest.pulls.requestReviewers({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: context.issue.number,
+ team_reviewers: [slug],
});
- // TODO: Maybe use GitHub API to request review / assign team
- }
};
return found_label
- name: remove-labels
