Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 8acc745

Browse files
committed
Switch to info log level
1 parent 7d3156a commit 8acc745

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

lib/events.ts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
EventContext,
2020
EventHandler,
2121
github,
22+
log,
2223
project,
2324
repository,
2425
runSteps,
@@ -121,7 +122,7 @@ const CommandStep: NpmStep = {
121122
const result = await childProcess.spawnPromise(
122123
"bash",
123124
["-c", ctx.configuration.parameters.command],
124-
{ log: childProcess.captureLog() },
125+
{ log: childProcess.captureLog(log.info) },
125126
);
126127
if (result.status !== 0) {
127128
params.body.push(spawnFailure(result));
@@ -184,10 +185,11 @@ const SetupNodeStep: NpmStep = {
184185
const commit = eventCommit(ctx.data);
185186
const cfg = ctx.configuration?.parameters;
186187
// Set up node version
187-
let result = await params.project.spawn("bash", [
188-
"-c",
189-
`. /opt/.nvm/nvm.sh && nvm install ${cfg.version}`,
190-
]);
188+
let result = await params.project.spawn(
189+
"bash",
190+
["-c", `. /opt/.nvm/nvm.sh && nvm install ${cfg.version}`],
191+
{ level: "info" },
192+
);
191193
if (result.status !== 0) {
192194
params.body.push(spawnFailure(result));
193195
await params.check.update({
@@ -203,12 +205,13 @@ const SetupNodeStep: NpmStep = {
203205
);
204206
}
205207
// set the unsafe-prem config
206-
await params.project.spawn("bash", [
207-
"-c",
208-
`. /opt/.nvm/nvm.sh && npm config set unsafe-perm true`,
209-
]);
208+
await params.project.spawn(
209+
"bash",
210+
["-c", `. /opt/.nvm/nvm.sh && npm config set unsafe-perm true`],
211+
{ level: "info" },
212+
);
210213

211-
const captureLog = childProcess.captureLog();
214+
const captureLog = childProcess.captureLog(log.info);
212215
result = await params.project.spawn(
213216
"bash",
214217
["-c", `. /opt/.nvm/nvm.sh && nvm which ${cfg.version}`],
@@ -272,6 +275,7 @@ const NpmInstallStep: NpmStep = {
272275
NODE_ENV: "development",
273276
PATH: `${params.path}:${process.env.PATH}`,
274277
},
278+
level: "info" as any,
275279
};
276280
let result: childProcess.SpawnPromiseReturns;
277281
if (await fs.pathExists(params.project.path("package-lock.json"))) {
@@ -320,7 +324,7 @@ const NpmScriptsStep: NpmStep = {
320324

321325
// Run scripts
322326
for (const script of scripts) {
323-
const captureLog = childProcess.captureLog();
327+
const captureLog = childProcess.captureLog(log.info);
324328
const result = await params.project.spawn(
325329
"npm",
326330
["run", "--if-present", script],
@@ -404,6 +408,7 @@ const NpmVersionStep: NpmStep = {
404408
...process.env,
405409
PATH: `${params.path}:${process.env.PATH}`,
406410
},
411+
level: "info",
407412
});
408413
pj = await fs.readJson(params.project.path("package.json"));
409414
version = pj.version;
@@ -512,6 +517,7 @@ const NpmVersionStep: NpmStep = {
512517
...process.env,
513518
PATH: `${params.path}:${process.env.PATH}`,
514519
},
520+
level: "info",
515521
},
516522
);
517523
if (result.status !== 0) {
@@ -572,6 +578,7 @@ const NpmPublishStep: NpmStep = {
572578
...process.env,
573579
PATH: `${params.path}:${process.env.PATH}`,
574580
},
581+
level: "info",
575582
});
576583
if (result.status !== 0) {
577584
params.body.push(spawnFailure(result));
@@ -606,6 +613,7 @@ const NpmPublishStep: NpmStep = {
606613
...process.env,
607614
PATH: `${params.path}:${process.env.PATH}`,
608615
},
616+
level: "info",
609617
},
610618
);
611619
if (tagResult.status !== 0) {

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"test:one": "mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\""
4949
},
5050
"dependencies": {
51-
"@atomist/skill": "^0.9.2-main.47",
51+
"@atomist/skill": "^0.9.2-main.51",
5252
"fs-extra": "^9.1.0",
5353
"p-retry": "^4.5.0",
5454
"semver": "^7.3.5"

0 commit comments

Comments
 (0)