-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.ts
42 lines (31 loc) · 1.23 KB
/
typings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { Octokit, RestEndpointMethodTypes } from "@octokit/rest";
import { Endpoints } from "@octokit/types";
import { Commit } from "conventional-commits-parser";
export type ActionArgs = {
repoToken: string;
title: string;
preRelease: boolean;
automaticReleaseTag: string;
environment: "dev" | "prod";
files: string[];
};
export type CreateReleaseParams =
Endpoints["POST /repos/{owner}/{repo}/releases"]["parameters"];
export type CreateReleaseResponse =
RestEndpointMethodTypes["repos"]["createRelease"]["response"];
export type GitGetRefParams =
Endpoints["GET /repos/{owner}/{repo}/git/ref/{ref}"]["parameters"];
export type CreateRefParams =
Endpoints["POST /repos/{owner}/{repo}/git/refs"]["parameters"];
export type ReposListTagsParams =
Endpoints["GET /repos/{owner}/{repo}/tags"]["parameters"];
export type GetReleaseByTagParams =
Endpoints["GET /repos/{owner}/{repo}/releases/tags/{tag}"]["parameters"];
export type BaseheadCommits =
RestEndpointMethodTypes["repos"]["compareCommitsWithBasehead"]["response"];
export type BaseheadCommit = BaseheadCommits["data"]["commits"][0];
export type OctokitClient = InstanceType<typeof Octokit>;
export type ParsedCommit = {
commitMsg: Commit;
commit: BaseheadCommit;
};