@tahminator/pipeline 1.0.75-beta.6f4bf3b7 → 1.0.75

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.
@@ -88,10 +88,10 @@ export declare class GitHubClient {
88
88
  */
89
89
  mergePr(...args: Parameters<GitHubPRManager["mergePr"]>): Promise<void>;
90
90
  /**
91
- * Create, update, or get a check run (the "status checks" shown on a PR/commit), dispatched
92
- * by `args.action`.
91
+ * Create or update a check run (the "status checks" shown on a PR/commit), dispatched by
92
+ * `action`.
93
93
  */
94
- statusCheck(...args: Parameters<GitHubPRManager["statusCheck"]>): Promise<{
94
+ writeStatusCheck(...args: Parameters<GitHubPRManager["writeStatusCheck"]>): Promise<{
95
95
  id: number;
96
96
  head_sha: string;
97
97
  node_id: string;
@@ -117,7 +117,7 @@ export declare class GitHubClient {
117
117
  app: import("@octokit/openapi-types").components["schemas"]["nullable-integration"];
118
118
  pull_requests: import("@octokit/openapi-types").components["schemas"]["pull-request-minimal"][];
119
119
  deployment?: import("@octokit/openapi-types").components["schemas"]["deployment-simple"];
120
- } | null>;
120
+ }>;
121
121
  /**
122
122
  * Confirms whether the given user is an active member of a team within an org.
123
123
  *
package/dist/gh/client.js CHANGED
@@ -120,11 +120,11 @@ export class GitHubClient {
120
120
  return this.prManager.mergePr(...args);
121
121
  }
122
122
  /**
123
- * Create, update, or get a check run (the "status checks" shown on a PR/commit), dispatched
124
- * by `args.action`.
123
+ * Create or update a check run (the "status checks" shown on a PR/commit), dispatched by
124
+ * `action`.
125
125
  */
126
- statusCheck(...args) {
127
- return this.prManager.statusCheck(...args);
126
+ writeStatusCheck(...args) {
127
+ return this.prManager.writeStatusCheck(...args);
128
128
  }
129
129
  /**
130
130
  * Confirms whether the given user is an active member of a team within an org.
@@ -7,7 +7,7 @@ type CheckRunOutput = {
7
7
  summary: string;
8
8
  text?: string;
9
9
  };
10
- type StatusCheckArgs = {
10
+ type WriteStatusCheckArgs = {
11
11
  action: "create";
12
12
  owner: string;
13
13
  repository: string;
@@ -29,15 +29,6 @@ type StatusCheckArgs = {
29
29
  conclusion?: CheckRunConclusion;
30
30
  output?: CheckRunOutput;
31
31
  detailsUrl?: string;
32
- } | {
33
- action: "get";
34
- owner: string;
35
- repository: string;
36
- /**
37
- * commit sha, branch name, or tag name
38
- */
39
- ref: string;
40
- name: string;
41
32
  };
42
33
  export declare class GitHubPRManager {
43
34
  private readonly client;
@@ -56,7 +47,7 @@ export declare class GitHubPRManager {
56
47
  repository: string;
57
48
  mergeMethod?: "merge" | "squash" | "rebase";
58
49
  }): Promise<void>;
59
- statusCheck(args: StatusCheckArgs): Promise<{
50
+ writeStatusCheck(args: WriteStatusCheckArgs): Promise<{
60
51
  id: number;
61
52
  head_sha: string;
62
53
  node_id: string;
@@ -82,7 +73,7 @@ export declare class GitHubPRManager {
82
73
  app: import("@octokit/openapi-types").components["schemas"]["nullable-integration"];
83
74
  pull_requests: import("@octokit/openapi-types").components["schemas"]["pull-request-minimal"][];
84
75
  deployment?: import("@octokit/openapi-types").components["schemas"]["deployment-simple"];
85
- } | null>;
76
+ }>;
86
77
  sendPrMessage({ prId, owner, repository, message, }: {
87
78
  prId: number;
88
79
  owner: string;
@@ -82,7 +82,7 @@ export class GitHubPRManager {
82
82
  merge_method: mergeMethod,
83
83
  });
84
84
  }
85
- async statusCheck(args) {
85
+ async writeStatusCheck(args) {
86
86
  switch (args.action) {
87
87
  case "create": {
88
88
  const { owner, repository, sha, name, status, conclusion, output, detailsUrl, } = args;
@@ -111,16 +111,6 @@ export class GitHubPRManager {
111
111
  });
112
112
  return data;
113
113
  }
114
- case "get": {
115
- const { owner, repository, ref, name } = args;
116
- const { data } = await this.client.rest.checks.listForRef({
117
- owner,
118
- repo: repository,
119
- ref,
120
- check_name: name,
121
- });
122
- return data.check_runs[0] ?? null;
123
- }
124
114
  }
125
115
  }
126
116
  async sendPrMessage({ prId, owner, repository, message, }) {
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.75-beta.6f4bf3b7",
6
+ "version": "1.0.75",
7
7
  "repository": {
8
8
  "url": "git+https://github.com/tahminator/pipeline.git"
9
9
  },