mirror of
https://github.com/actions/labeler.git
synced 2025-12-12 12:37:48 +00:00
General refactoring
This commit is contained in:
15
src/api/set-labels.ts
Normal file
15
src/api/set-labels.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as github from '@actions/github';
|
||||
import {ClientType} from './types';
|
||||
|
||||
export const setLabels = async (
|
||||
client: ClientType,
|
||||
prNumber: number,
|
||||
labels: string[]
|
||||
) => {
|
||||
await client.rest.issues.setLabels({
|
||||
owner: github.context.repo.owner,
|
||||
repo: github.context.repo.repo,
|
||||
issue_number: prNumber,
|
||||
labels: labels
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user