diff --git a/index.js b/index.js index ca95e9f..4ce0a2d 100644 --- a/index.js +++ b/index.js @@ -112,7 +112,7 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) { } if ('CI' in env) { - if ('GITHUB_ACTIONS' in env) { + if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) { return 3; } diff --git a/test.js b/test.js index 8866073..dfcb2f1 100644 --- a/test.js +++ b/test.js @@ -215,6 +215,12 @@ test('return true if `DRONE` is in env', t => { t.truthy(result.stdout); }); +test('return level 3 if `GITEA_ACTIONS` is in env', t => { + process.env = {CI: true, GITEA_ACTIONS: true}; + const result = importFresh('./index.js'); + t.is(result.stdout.level, 3); +}); + test('return true if Codeship is in env', t => { process.env = {CI: true, CI_NAME: 'codeship'}; const result = importFresh('./index.js');