Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher committed Jan 10, 2025
1 parent 121cf32 commit 6bd91f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/get-project-id.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export default ({ envCi: { service } = {}, env: { CI_PROJECT_ID } }) =>
service === "gitlab" && CI_PROJECT_ID
? CI_PROJECT_ID
: null;
service === "gitlab" && CI_PROJECT_ID ? CI_PROJECT_ID : null;
5 changes: 4 additions & 1 deletion test/get-project-path.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ test("Parse repo id with context in repo URL", (t) => {

test("Parse repo id with context not in repo URL", (t) => {
t.is(getProjectPath({ env: {} }, "https://gitlbab.com/context", "https://gitlab.com/owner/repo.git"), "owner/repo");
t.is(getProjectPath({ env: {} }, "https://gitlab.com/context", "git+ssh://[email protected]/owner/repo.git"), "owner/repo");
t.is(
getProjectPath({ env: {} }, "https://gitlab.com/context", "git+ssh://[email protected]/owner/repo.git"),
"owner/repo"
);
});

test("Parse repo id with organization and subgroup", (t) => {
Expand Down

0 comments on commit 6bd91f8

Please sign in to comment.