Skip to content

Commit fc29c54

Browse files
committed
refactor: remove namespace gh import
1 parent a3a10b5 commit fc29c54

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/logger/transports/github.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
'use strict';
22

3-
import * as core from '@actions/core';
3+
import { debug, notice, warning, error } from '@actions/core';
44

55
import { LogLevel } from '../constants.mjs';
66
import { prettifyLevel } from '../utils/colors.mjs';
77
import { prettifyTimestamp } from '../utils/time.mjs';
88

99
const actions = {
10-
[LogLevel.debug]: core.debug,
11-
[LogLevel.info]: core.notice,
12-
[LogLevel.warn]: core.warning,
13-
[LogLevel.error]: core.error,
14-
[LogLevel.fatal]: core.error,
10+
[LogLevel.debug]: debug,
11+
[LogLevel.info]: notice,
12+
[LogLevel.warn]: warning,
13+
[LogLevel.error]: error,
14+
[LogLevel.fatal]: error,
1515
};
1616

1717
/**
@@ -30,7 +30,7 @@ const github = ({ level, message, timestamp, metadata = {}, module }) => {
3030

3131
const logMessage = `[${time}] ${prettyLevel}${module ? ` (${module})` : ''}: ${message}`;
3232

33-
const logFn = actions[level] ?? core.notice;
33+
const logFn = actions[level] ?? notice;
3434

3535
logFn(logMessage, {
3636
file: file?.path,

0 commit comments

Comments
 (0)