mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-21 19:25:46 +08:00
feat: refactor 3.0
This commit is contained in:
2
src/issue/index.ts
Normal file
2
src/issue/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './issue';
|
||||
export * from './types';
|
1
src/issue/issue.ts
Normal file
1
src/issue/issue.ts
Normal file
@@ -0,0 +1 @@
|
||||
export class IssueCoreEngine
|
36
src/issue/types.ts
Normal file
36
src/issue/types.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { TEmoji, TLockReasons, TStringOrVoid } from '../types';
|
||||
|
||||
export interface IIssueBaseInfo {
|
||||
owner: string;
|
||||
repo: string;
|
||||
issueNunber: string | void;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface IIssueCoreEngine {
|
||||
addAssignees(assignees: string[]): void;
|
||||
addLabels(labels: string[]): void;
|
||||
|
||||
closeIssue(): void;
|
||||
/**
|
||||
* @param body The comment body.
|
||||
* @returns The create new comment id.
|
||||
*/
|
||||
createComment(body: string): string;
|
||||
createCommentEmoji(emoji: TEmoji): void;
|
||||
/**
|
||||
* @param title
|
||||
* @param body
|
||||
* @param labels
|
||||
* @param assignees
|
||||
* @returns The create new issue number.
|
||||
*/
|
||||
createIssue(title: string, body: TStringOrVoid, labels: string[], assignees: string[]): string;
|
||||
createIssueEmoji(emoji: TEmoji): void;
|
||||
createLabel(labelName: string, labelColor: string, labelDescription: TStringOrVoid): void;
|
||||
|
||||
deleteComment(commentId: string): void;
|
||||
|
||||
lockIssue(lockReason: TLockReasons): void;
|
||||
}
|
Reference in New Issue
Block a user