@tahminator/pipeline 1.0.36 → 1.0.38

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.
@@ -23,14 +23,14 @@ export class EnvClient {
23
23
  continue;
24
24
  }
25
25
  console.log(`Masking ${varName}`);
26
- console.log(`::add-mask::${value}`);
27
26
  const lines = value.split("\n");
28
- if (lines.length > 1) {
29
- for (const line of lines) {
30
- if (!line)
31
- continue;
27
+ if (lines.length == 1) {
28
+ console.log(`::add-mask::${value}`);
29
+ }
30
+ else {
31
+ lines.forEach((line) => {
32
32
  console.log(`::add-mask::${line}`);
33
- }
33
+ });
34
34
  }
35
35
  }
36
36
  return Object.fromEntries(envs);
@@ -37,4 +37,5 @@ export declare class GitHubClient {
37
37
  createTag(...args: Parameters<GitHubTagManager["createTag"]>): Promise<void>;
38
38
  outputToGithubOutput(...args: Parameters<GitHubOutputManager["outputToGithubOutput"]>): Promise<void>;
39
39
  updateK8sTagWithPR(...args: Parameters<GitHubPRManager["updateK8sTagWithPR"]>): Promise<void>;
40
+ sendPrMessage(...args: Parameters<GitHubPRManager["sendPrMessage"]>): Promise<void>;
40
41
  }
package/dist/gh/client.js CHANGED
@@ -62,4 +62,7 @@ export class GitHubClient {
62
62
  updateK8sTagWithPR(...args) {
63
63
  return this.prManager.updateK8sTagWithPR(...args);
64
64
  }
65
+ sendPrMessage(...args) {
66
+ return this.prManager.sendPrMessage(...args);
67
+ }
65
68
  }
@@ -34,4 +34,10 @@ export declare class GitHubPRManager {
34
34
  originRepo: [OwnerString, RepoString];
35
35
  manifestRepo: [OwnerString, RepoString];
36
36
  }): Promise<void>;
37
+ sendPrMessage({ prId, owner, repository, message, }: {
38
+ prId: number;
39
+ owner: string;
40
+ repository: string;
41
+ message: string;
42
+ }): Promise<void>;
37
43
  }
@@ -98,4 +98,12 @@ export class GitHubPRManager {
98
98
  merge_method: "squash",
99
99
  });
100
100
  }
101
+ async sendPrMessage({ prId, owner, repository, message, }) {
102
+ await this.client.rest.issues.createComment({
103
+ issue_number: prId,
104
+ owner,
105
+ repo: repository,
106
+ body: message,
107
+ });
108
+ }
101
109
  }
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.36",
6
+ "version": "1.0.38",
7
7
  "repository": {
8
8
  "url": "git+https://github.com/tahminator/pipeline.git"
9
9
  },