@tahminator/pipeline 1.0.74-beta.6f734379 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gh/client.d.ts +0 -82
- package/dist/gh/client.js +0 -58
- package/dist/gh/output/index.d.ts +6 -0
- package/dist/gh/output/index.js +6 -0
- package/dist/gh/pr/index.d.ts +27 -58
- package/dist/gh/pr/index.js +27 -31
- package/dist/gh/tag/index.d.ts +12 -0
- package/dist/gh/tag/index.js +12 -0
- package/dist/gh/team/index.d.ts +6 -0
- package/dist/gh/team/index.js +6 -0
- package/package.json +1 -1
package/dist/gh/client.d.ts
CHANGED
|
@@ -36,93 +36,11 @@ export declare class GitHubClient {
|
|
|
36
36
|
* @deprecated use `createWithGithubAppToken`
|
|
37
37
|
*/
|
|
38
38
|
static createWithPatCiToken(pat: string): Promise<GitHubClient>;
|
|
39
|
-
/**
|
|
40
|
-
* Utilizes the GitHub API to create a new tag version in the given repository.
|
|
41
|
-
*
|
|
42
|
-
* @note You **must** pass in a GitHub token because the regular Github bot token
|
|
43
|
-
* cannot trigger actions (due to fear of recursion). You must either provide a GitHub App token or
|
|
44
|
-
* a GitHub PAT.
|
|
45
|
-
*
|
|
46
|
-
* @note you should use `VersioningClient` to generate `nextTag`
|
|
47
|
-
*/
|
|
48
39
|
createTag(...args: Parameters<GitHubTagManager["createTag"]>): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Returns the latest stable semver tag in the repository.
|
|
51
|
-
*/
|
|
52
40
|
getLatestTag(...args: Parameters<GitHubTagManager["getLatestTag"]>): Promise<string | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Write an output back to Github Actions in order to re-use / pass
|
|
55
|
-
* data between steps, jobs, etc.
|
|
56
|
-
*
|
|
57
|
-
* @see documentation for passing outputs between jobs [here](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/pass-job-outputs)
|
|
58
|
-
*/
|
|
59
41
|
outputToGithubOutput(...args: Parameters<GitHubOutputManager["outputToGithubOutput"]>): Promise<void>;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* update k8s manifest repo with new tag version.
|
|
63
|
-
*
|
|
64
|
-
* @note `kustomizationFile` must look like this:
|
|
65
|
-
*
|
|
66
|
-
* ```yaml
|
|
67
|
-
* apiVersion: kustomize.config.k8s.io/v1beta1
|
|
68
|
-
* kind: Kustomization
|
|
69
|
-
* resources:
|
|
70
|
-
* - deployment.yaml
|
|
71
|
-
* - secrets.yaml
|
|
72
|
-
* - service.yaml
|
|
73
|
-
* - monitor.yaml
|
|
74
|
-
* commonLabels:
|
|
75
|
-
* app: instalock-web
|
|
76
|
-
* environment: production
|
|
77
|
-
* # This part specifically
|
|
78
|
-
* images:
|
|
79
|
-
* - name: tahminator/instalock-web
|
|
80
|
-
* newTag: a70ee0e
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
42
|
updateK8sTagWithPR(...args: Parameters<GitHubPRManager["updateK8sTagWithPR"]>): Promise<void>;
|
|
84
43
|
sendPrMessage(...args: Parameters<GitHubPRManager["sendPrMessage"]>): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* @note if the PR doesn't exist yet, just use `updateK8sTagWithPR` instead, since it
|
|
87
|
-
* creates the PR with the necessary changes and merges it for you in one call.
|
|
88
|
-
*/
|
|
89
44
|
mergePr(...args: Parameters<GitHubPRManager["mergePr"]>): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Create or update a check run (the "status checks" shown on a PR/commit), dispatched by
|
|
92
|
-
* `action`.
|
|
93
|
-
*/
|
|
94
|
-
writeStatusCheck(...args: Parameters<GitHubPRManager["writeStatusCheck"]>): Promise<{
|
|
95
|
-
id: number;
|
|
96
|
-
head_sha: string;
|
|
97
|
-
node_id: string;
|
|
98
|
-
external_id: string | null;
|
|
99
|
-
url: string;
|
|
100
|
-
html_url: string | null;
|
|
101
|
-
details_url: string | null;
|
|
102
|
-
status: "queued" | "in_progress" | "completed" | "waiting" | "requested" | "pending";
|
|
103
|
-
conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null;
|
|
104
|
-
started_at: string | null;
|
|
105
|
-
completed_at: string | null;
|
|
106
|
-
output: {
|
|
107
|
-
title: string | null;
|
|
108
|
-
summary: string | null;
|
|
109
|
-
text: string | null;
|
|
110
|
-
annotations_count: number;
|
|
111
|
-
annotations_url: string;
|
|
112
|
-
};
|
|
113
|
-
name: string;
|
|
114
|
-
check_suite: {
|
|
115
|
-
id: number;
|
|
116
|
-
} | null;
|
|
117
|
-
app: import("@octokit/openapi-types").components["schemas"]["nullable-integration"];
|
|
118
|
-
pull_requests: import("@octokit/openapi-types").components["schemas"]["pull-request-minimal"][];
|
|
119
|
-
deployment?: import("@octokit/openapi-types").components["schemas"]["deployment-simple"];
|
|
120
|
-
}>;
|
|
121
|
-
/**
|
|
122
|
-
* Confirms whether the given user is an active member of a team within an org.
|
|
123
|
-
*
|
|
124
|
-
* @note this only returns `true` for `active` memberships. A user with a `pending`
|
|
125
|
-
* invite (has not accepted yet) will return `false`.
|
|
126
|
-
*/
|
|
127
45
|
isTeamMember(...args: Parameters<GitHubTeamManager["isTeamMember"]>): Promise<boolean>;
|
|
128
46
|
}
|
package/dist/gh/client.js
CHANGED
|
@@ -56,82 +56,24 @@ export class GitHubClient {
|
|
|
56
56
|
auth: pat,
|
|
57
57
|
}), true);
|
|
58
58
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Utilizes the GitHub API to create a new tag version in the given repository.
|
|
61
|
-
*
|
|
62
|
-
* @note You **must** pass in a GitHub token because the regular Github bot token
|
|
63
|
-
* cannot trigger actions (due to fear of recursion). You must either provide a GitHub App token or
|
|
64
|
-
* a GitHub PAT.
|
|
65
|
-
*
|
|
66
|
-
* @note you should use `VersioningClient` to generate `nextTag`
|
|
67
|
-
*/
|
|
68
59
|
createTag(...args) {
|
|
69
60
|
return this.tagManager.createTag(...args);
|
|
70
61
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Returns the latest stable semver tag in the repository.
|
|
73
|
-
*/
|
|
74
62
|
getLatestTag(...args) {
|
|
75
63
|
return this.tagManager.getLatestTag(...args);
|
|
76
64
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Write an output back to Github Actions in order to re-use / pass
|
|
79
|
-
* data between steps, jobs, etc.
|
|
80
|
-
*
|
|
81
|
-
* @see documentation for passing outputs between jobs [here](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/pass-job-outputs)
|
|
82
|
-
*/
|
|
83
65
|
outputToGithubOutput(...args) {
|
|
84
66
|
return this.outputManager.outputToGithubOutput(...args);
|
|
85
67
|
}
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* update k8s manifest repo with new tag version.
|
|
89
|
-
*
|
|
90
|
-
* @note `kustomizationFile` must look like this:
|
|
91
|
-
*
|
|
92
|
-
* ```yaml
|
|
93
|
-
* apiVersion: kustomize.config.k8s.io/v1beta1
|
|
94
|
-
* kind: Kustomization
|
|
95
|
-
* resources:
|
|
96
|
-
* - deployment.yaml
|
|
97
|
-
* - secrets.yaml
|
|
98
|
-
* - service.yaml
|
|
99
|
-
* - monitor.yaml
|
|
100
|
-
* commonLabels:
|
|
101
|
-
* app: instalock-web
|
|
102
|
-
* environment: production
|
|
103
|
-
* # This part specifically
|
|
104
|
-
* images:
|
|
105
|
-
* - name: tahminator/instalock-web
|
|
106
|
-
* newTag: a70ee0e
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
68
|
updateK8sTagWithPR(...args) {
|
|
110
69
|
return this.prManager.updateK8sTagWithPR(...args);
|
|
111
70
|
}
|
|
112
71
|
sendPrMessage(...args) {
|
|
113
72
|
return this.prManager.sendPrMessage(...args);
|
|
114
73
|
}
|
|
115
|
-
/**
|
|
116
|
-
* @note if the PR doesn't exist yet, just use `updateK8sTagWithPR` instead, since it
|
|
117
|
-
* creates the PR with the necessary changes and merges it for you in one call.
|
|
118
|
-
*/
|
|
119
74
|
mergePr(...args) {
|
|
120
75
|
return this.prManager.mergePr(...args);
|
|
121
76
|
}
|
|
122
|
-
/**
|
|
123
|
-
* Create or update a check run (the "status checks" shown on a PR/commit), dispatched by
|
|
124
|
-
* `action`.
|
|
125
|
-
*/
|
|
126
|
-
writeStatusCheck(...args) {
|
|
127
|
-
return this.prManager.writeStatusCheck(...args);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Confirms whether the given user is an active member of a team within an org.
|
|
131
|
-
*
|
|
132
|
-
* @note this only returns `true` for `active` memberships. A user with a `pending`
|
|
133
|
-
* invite (has not accepted yet) will return `false`.
|
|
134
|
-
*/
|
|
135
77
|
isTeamMember(...args) {
|
|
136
78
|
return this.teamManager.isTeamMember(...args);
|
|
137
79
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export declare class GitHubOutputManager {
|
|
2
2
|
constructor();
|
|
3
|
+
/**
|
|
4
|
+
* Write an output back to Github Actions in order to re-use / pass
|
|
5
|
+
* data between steps, jobs, etc.
|
|
6
|
+
*
|
|
7
|
+
* @see documentation for passing outputs between jobs [here](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/pass-job-outputs)
|
|
8
|
+
*/
|
|
3
9
|
outputToGithubOutput({ overrideGithubOutputFile, ctx, }: {
|
|
4
10
|
overrideGithubOutputFile?: string;
|
|
5
11
|
ctx: Record<string, unknown>;
|
package/dist/gh/output/index.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export class GitHubOutputManager {
|
|
2
2
|
constructor() { }
|
|
3
|
+
/**
|
|
4
|
+
* Write an output back to Github Actions in order to re-use / pass
|
|
5
|
+
* data between steps, jobs, etc.
|
|
6
|
+
*
|
|
7
|
+
* @see documentation for passing outputs between jobs [here](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/pass-job-outputs)
|
|
8
|
+
*/
|
|
3
9
|
async outputToGithubOutput({ overrideGithubOutputFile, ctx, }) {
|
|
4
10
|
const githubOutputEnv = (() => {
|
|
5
11
|
const v = process.env.GITHUB_OUTPUT;
|
package/dist/gh/pr/index.d.ts
CHANGED
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
import type { Octokit } from "@octokit/rest";
|
|
2
2
|
import type { Environment, OwnerString, RepoString } from "../../types";
|
|
3
|
-
type CheckRunStatus = "queued" | "in_progress" | "completed";
|
|
4
|
-
type CheckRunConclusion = "action_required" | "cancelled" | "failure" | "neutral" | "success" | "skipped" | "stale" | "timed_out";
|
|
5
|
-
type CheckRunOutput = {
|
|
6
|
-
title: string;
|
|
7
|
-
summary: string;
|
|
8
|
-
text?: string;
|
|
9
|
-
};
|
|
10
|
-
type WriteStatusCheckArgs = {
|
|
11
|
-
action: "create";
|
|
12
|
-
owner: string;
|
|
13
|
-
repository: string;
|
|
14
|
-
/**
|
|
15
|
-
* commit sha the check run applies to
|
|
16
|
-
*/
|
|
17
|
-
sha: string;
|
|
18
|
-
name: string;
|
|
19
|
-
status?: CheckRunStatus;
|
|
20
|
-
conclusion?: CheckRunConclusion;
|
|
21
|
-
output?: CheckRunOutput;
|
|
22
|
-
detailsUrl?: string;
|
|
23
|
-
} | {
|
|
24
|
-
action: "update";
|
|
25
|
-
owner: string;
|
|
26
|
-
repository: string;
|
|
27
|
-
checkRunId: number;
|
|
28
|
-
status?: CheckRunStatus;
|
|
29
|
-
conclusion?: CheckRunConclusion;
|
|
30
|
-
output?: CheckRunOutput;
|
|
31
|
-
detailsUrl?: string;
|
|
32
|
-
};
|
|
33
3
|
export declare class GitHubPRManager {
|
|
34
4
|
private readonly client;
|
|
35
5
|
constructor(client: Octokit);
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* update k8s manifest repo with new tag version.
|
|
9
|
+
*
|
|
10
|
+
* @note `kustomizationFile` must look like this:
|
|
11
|
+
*
|
|
12
|
+
* ```yaml
|
|
13
|
+
* apiVersion: kustomize.config.k8s.io/v1beta1
|
|
14
|
+
* kind: Kustomization
|
|
15
|
+
* resources:
|
|
16
|
+
* - deployment.yaml
|
|
17
|
+
* - secrets.yaml
|
|
18
|
+
* - service.yaml
|
|
19
|
+
* - monitor.yaml
|
|
20
|
+
* commonLabels:
|
|
21
|
+
* app: instalock-web
|
|
22
|
+
* environment: production
|
|
23
|
+
* # This part specifically
|
|
24
|
+
* images:
|
|
25
|
+
* - name: tahminator/instalock-web
|
|
26
|
+
* newTag: a70ee0e
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
36
29
|
updateK8sTagWithPR({ newTag, imageName, kustomizationFilePath, environment, originRepo, manifestRepo, }: {
|
|
37
30
|
newTag: string;
|
|
38
31
|
imageName: string;
|
|
@@ -41,39 +34,16 @@ export declare class GitHubPRManager {
|
|
|
41
34
|
originRepo: [OwnerString, RepoString];
|
|
42
35
|
manifestRepo: [OwnerString, RepoString];
|
|
43
36
|
}): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* @note if the PR doesn't exist yet, just use `updateK8sTagWithPR` instead, since it
|
|
39
|
+
* creates the PR with the necessary changes and merges it for you in one call.
|
|
40
|
+
*/
|
|
44
41
|
mergePr({ prId, owner, repository, mergeMethod, }: {
|
|
45
42
|
prId: number;
|
|
46
43
|
owner: string;
|
|
47
44
|
repository: string;
|
|
48
45
|
mergeMethod?: "merge" | "squash" | "rebase";
|
|
49
46
|
}): Promise<void>;
|
|
50
|
-
writeStatusCheck(args: WriteStatusCheckArgs): Promise<{
|
|
51
|
-
id: number;
|
|
52
|
-
head_sha: string;
|
|
53
|
-
node_id: string;
|
|
54
|
-
external_id: string | null;
|
|
55
|
-
url: string;
|
|
56
|
-
html_url: string | null;
|
|
57
|
-
details_url: string | null;
|
|
58
|
-
status: "queued" | "in_progress" | "completed" | "waiting" | "requested" | "pending";
|
|
59
|
-
conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null;
|
|
60
|
-
started_at: string | null;
|
|
61
|
-
completed_at: string | null;
|
|
62
|
-
output: {
|
|
63
|
-
title: string | null;
|
|
64
|
-
summary: string | null;
|
|
65
|
-
text: string | null;
|
|
66
|
-
annotations_count: number;
|
|
67
|
-
annotations_url: string;
|
|
68
|
-
};
|
|
69
|
-
name: string;
|
|
70
|
-
check_suite: {
|
|
71
|
-
id: number;
|
|
72
|
-
} | null;
|
|
73
|
-
app: import("@octokit/openapi-types").components["schemas"]["nullable-integration"];
|
|
74
|
-
pull_requests: import("@octokit/openapi-types").components["schemas"]["pull-request-minimal"][];
|
|
75
|
-
deployment?: import("@octokit/openapi-types").components["schemas"]["deployment-simple"];
|
|
76
|
-
}>;
|
|
77
47
|
sendPrMessage({ prId, owner, repository, message, }: {
|
|
78
48
|
prId: number;
|
|
79
49
|
owner: string;
|
|
@@ -81,4 +51,3 @@ export declare class GitHubPRManager {
|
|
|
81
51
|
message: string;
|
|
82
52
|
}): Promise<void>;
|
|
83
53
|
}
|
|
84
|
-
export {};
|
package/dist/gh/pr/index.js
CHANGED
|
@@ -6,6 +6,29 @@ export class GitHubPRManager {
|
|
|
6
6
|
constructor(client) {
|
|
7
7
|
this.client = client;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* update k8s manifest repo with new tag version.
|
|
12
|
+
*
|
|
13
|
+
* @note `kustomizationFile` must look like this:
|
|
14
|
+
*
|
|
15
|
+
* ```yaml
|
|
16
|
+
* apiVersion: kustomize.config.k8s.io/v1beta1
|
|
17
|
+
* kind: Kustomization
|
|
18
|
+
* resources:
|
|
19
|
+
* - deployment.yaml
|
|
20
|
+
* - secrets.yaml
|
|
21
|
+
* - service.yaml
|
|
22
|
+
* - monitor.yaml
|
|
23
|
+
* commonLabels:
|
|
24
|
+
* app: instalock-web
|
|
25
|
+
* environment: production
|
|
26
|
+
* # This part specifically
|
|
27
|
+
* images:
|
|
28
|
+
* - name: tahminator/instalock-web
|
|
29
|
+
* newTag: a70ee0e
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
9
32
|
async updateK8sTagWithPR({ newTag, imageName, kustomizationFilePath, environment, originRepo, manifestRepo, }) {
|
|
10
33
|
const [manifestOwner, manifestRepository] = manifestRepo;
|
|
11
34
|
const [originOwner, originRepository] = originRepo;
|
|
@@ -74,6 +97,10 @@ export class GitHubPRManager {
|
|
|
74
97
|
repository: manifestRepository,
|
|
75
98
|
});
|
|
76
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* @note if the PR doesn't exist yet, just use `updateK8sTagWithPR` instead, since it
|
|
102
|
+
* creates the PR with the necessary changes and merges it for you in one call.
|
|
103
|
+
*/
|
|
77
104
|
async mergePr({ prId, owner, repository, mergeMethod = "squash", }) {
|
|
78
105
|
await this.client.rest.pulls.merge({
|
|
79
106
|
owner,
|
|
@@ -82,37 +109,6 @@ export class GitHubPRManager {
|
|
|
82
109
|
merge_method: mergeMethod,
|
|
83
110
|
});
|
|
84
111
|
}
|
|
85
|
-
async writeStatusCheck(args) {
|
|
86
|
-
switch (args.action) {
|
|
87
|
-
case "create": {
|
|
88
|
-
const { owner, repository, sha, name, status, conclusion, output, detailsUrl, } = args;
|
|
89
|
-
const { data } = await this.client.rest.checks.create({
|
|
90
|
-
owner,
|
|
91
|
-
repo: repository,
|
|
92
|
-
head_sha: sha,
|
|
93
|
-
name,
|
|
94
|
-
status,
|
|
95
|
-
conclusion,
|
|
96
|
-
output,
|
|
97
|
-
details_url: detailsUrl,
|
|
98
|
-
});
|
|
99
|
-
return data;
|
|
100
|
-
}
|
|
101
|
-
case "update": {
|
|
102
|
-
const { owner, repository, checkRunId, status, conclusion, output, detailsUrl, } = args;
|
|
103
|
-
const { data } = await this.client.rest.checks.update({
|
|
104
|
-
owner,
|
|
105
|
-
repo: repository,
|
|
106
|
-
check_run_id: checkRunId,
|
|
107
|
-
status,
|
|
108
|
-
conclusion,
|
|
109
|
-
output,
|
|
110
|
-
details_url: detailsUrl,
|
|
111
|
-
});
|
|
112
|
-
return data;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
112
|
async sendPrMessage({ prId, owner, repository, message, }) {
|
|
117
113
|
await this.client.rest.issues.createComment({
|
|
118
114
|
issue_number: prId,
|
package/dist/gh/tag/index.d.ts
CHANGED
|
@@ -5,9 +5,21 @@ export declare class GitHubTagManager {
|
|
|
5
5
|
private readonly isExplicitToken;
|
|
6
6
|
constructor(client: Octokit, isExplicitToken: boolean);
|
|
7
7
|
private checkToken;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the latest stable semver tag in the repository.
|
|
10
|
+
*/
|
|
8
11
|
getLatestTag({ repositoryOverride, }?: {
|
|
9
12
|
repositoryOverride?: [OwnerString, RepoString];
|
|
10
13
|
}): Promise<string | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Utilizes the GitHub API to create a new tag version in the given repository.
|
|
16
|
+
*
|
|
17
|
+
* @note You **must** pass in a GitHub token because the regular Github bot token
|
|
18
|
+
* cannot trigger actions (due to fear of recursion). You must either provide a GitHub App token or
|
|
19
|
+
* a GitHub PAT.
|
|
20
|
+
*
|
|
21
|
+
* @note you should use `VersioningClient` to generate `nextTag`
|
|
22
|
+
*/
|
|
11
23
|
createTag({ nextTag, repositoryOverride, onPreTagCreate, }: {
|
|
12
24
|
nextTag: string;
|
|
13
25
|
repositoryOverride?: [OwnerString, RepoString];
|
package/dist/gh/tag/index.js
CHANGED
|
@@ -13,6 +13,9 @@ export class GitHubTagManager {
|
|
|
13
13
|
throw new Error("You must pass in an explicit GitHub token for this operation. You may either use a PAT or a GitHub App Token");
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the latest stable semver tag in the repository.
|
|
18
|
+
*/
|
|
16
19
|
async getLatestTag({ repositoryOverride, } = {}) {
|
|
17
20
|
const [owner, repo] = this.parseRepository(repositoryOverride);
|
|
18
21
|
const { data: tags } = await this.client.rest.repos.listTags({
|
|
@@ -27,6 +30,15 @@ export class GitHubTagManager {
|
|
|
27
30
|
})
|
|
28
31
|
.sort(semver.rcompare)[0] ?? null);
|
|
29
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Utilizes the GitHub API to create a new tag version in the given repository.
|
|
35
|
+
*
|
|
36
|
+
* @note You **must** pass in a GitHub token because the regular Github bot token
|
|
37
|
+
* cannot trigger actions (due to fear of recursion). You must either provide a GitHub App token or
|
|
38
|
+
* a GitHub PAT.
|
|
39
|
+
*
|
|
40
|
+
* @note you should use `VersioningClient` to generate `nextTag`
|
|
41
|
+
*/
|
|
30
42
|
async createTag({ nextTag, repositoryOverride, onPreTagCreate, }) {
|
|
31
43
|
this.checkToken();
|
|
32
44
|
const [owner, repo] = this.parseRepository(repositoryOverride);
|
package/dist/gh/team/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import type { Octokit } from "@octokit/rest";
|
|
|
2
2
|
export declare class GitHubTeamManager {
|
|
3
3
|
private readonly client;
|
|
4
4
|
constructor(client: Octokit);
|
|
5
|
+
/**
|
|
6
|
+
* Confirms whether the given user is an active member of a team within an org.
|
|
7
|
+
*
|
|
8
|
+
* @note this only returns `true` for `active` memberships. A user with a `pending`
|
|
9
|
+
* invite (has not accepted yet) will return `false`.
|
|
10
|
+
*/
|
|
5
11
|
isTeamMember({ org, teamSlug, username, }: {
|
|
6
12
|
org: string;
|
|
7
13
|
teamSlug: string;
|
package/dist/gh/team/index.js
CHANGED
|
@@ -3,6 +3,12 @@ export class GitHubTeamManager {
|
|
|
3
3
|
constructor(client) {
|
|
4
4
|
this.client = client;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Confirms whether the given user is an active member of a team within an org.
|
|
8
|
+
*
|
|
9
|
+
* @note this only returns `true` for `active` memberships. A user with a `pending`
|
|
10
|
+
* invite (has not accepted yet) will return `false`.
|
|
11
|
+
*/
|
|
6
12
|
async isTeamMember({ org, teamSlug, username, }) {
|
|
7
13
|
try {
|
|
8
14
|
const { data } = await this.client.rest.teams.getMembershipForUserInOrg({
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Tahmid Ahmed",
|
|
5
5
|
"description": "A collection of Bun shell scripts that can be re-used in various CICD pipelines.",
|
|
6
|
-
"version": "1.0.74
|
|
6
|
+
"version": "1.0.74",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "git+https://github.com/tahminator/pipeline.git"
|
|
9
9
|
},
|