Skip to content

Commit beb7ac6

Browse files
committed
refactor: don't expose project ID
1 parent 38ac050 commit beb7ac6

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

lib/get-project-context.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default (
2020
const encodedProjectPath = encodeURIComponent(projectPath);
2121
const projectApiUrl = urlJoin(gitlabApiUrl, `/projects/${projectId ?? encodedProjectPath}`);
2222
return {
23-
projectId,
2423
projectPath,
2524
encodedProjectPath,
2625
projectApiUrl,

test/get-project-context.test.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -122,30 +122,6 @@ test("Ignore CI_PROJECT_PATH if not on GitLab CI", (t) => {
122122
);
123123
});
124124

125-
test("Get project ID from GitLab CI", (t) => {
126-
t.is(
127-
getProjectContext(
128-
{ envCi: { service: "gitlab" }, env: { CI_PROJECT_ID: "42" } },
129-
"https://gitlbab.com",
130-
"https://api.gitlab.com",
131-
"https://gitlab.com/owner/repo.git"
132-
).projectId,
133-
"42"
134-
);
135-
});
136-
137-
test("Ignore CI_PROJECT_ID if not on GitLab CI", (t) => {
138-
t.is(
139-
getProjectContext(
140-
{ envCi: { service: "travis" }, env: { CI_PROJECT_ID: "42" } },
141-
"https://gitlbab.com",
142-
"https://api.gitlab.com",
143-
"https://gitlab.com/owner/repo.git"
144-
).projectId,
145-
null
146-
);
147-
});
148-
149125
test("Uses project API URL with project path", (t) => {
150126
t.is(
151127
getProjectContext(

0 commit comments

Comments
 (0)