@pagopa/danger-plugin
Version:
Shared rules for DangerJS, used in the PagoPA projects
33 lines (32 loc) • 1.12 kB
TypeScript
/**
* type definition for generic tickets / stories and Jira conversion
*/
import { Ord } from "fp-ts/lib/Ord";
import { JiraIssueResponse } from "./jira/types";
export declare type GenericTicketType = "feat" | "fix" | "chore" | "epic";
export declare type Scope = string;
export interface Configuration {
readonly tagToScope: Record<string, Scope>;
readonly projectToScope: Record<string, Scope>;
readonly minLenPrDescription: number;
readonly updateLabel: boolean;
readonly updateTitle: boolean;
}
export declare const ticketPriority: Record<GenericTicketType, number>;
export interface GenericTicket {
readonly id: string;
readonly idPrefix?: string;
readonly title: string;
readonly type: GenericTicketType;
readonly projectId: string;
readonly tags: ReadonlyArray<string>;
readonly url: string;
readonly parent?: GenericTicket;
}
export declare const ticketOrdByType: Ord<GenericTicket>;
/**
* From {@link JiraIssueResponse} to {@link GenericTicket}
*
* @param jira
*/
export declare const fromJiraToGenericTicket: (jira: JiraIssueResponse) => GenericTicket;