Skip to content

Commit

Permalink
Add support for Gitea Actions (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind authored Jun 28, 2023
1 parent 30066cd commit 038b21a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 6 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 038b21a

Please sign in to comment.