File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
// https://buildkite.com/docs/builds/environment-variables
2
+ import { getSlugFromGitURL } from "../lib/git.js" ;
2
3
3
4
export default {
4
5
detect ( { env } ) {
@@ -21,7 +22,7 @@ export default {
21
22
branch : isPr
22
23
? env . BUILDKITE_PULL_REQUEST_BASE_BRANCH
23
24
: env . BUILDKITE_BRANCH ,
24
- slug : ` ${ env . BUILDKITE_ORGANIZATION_SLUG } / ${ env . BUILDKITE_PROJECT_SLUG } ` ,
25
+ slug : getSlugFromGitURL ( env . BUILDKITE_REPO ) ,
25
26
pr,
26
27
isPr,
27
28
prBranch : isPr ? env . BUILDKITE_BRANCH : undefined ,
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ const env = {
10
10
BUILDKITE_BRANCH : "master" ,
11
11
BUILDKITE_PULL_REQUEST : "false" ,
12
12
BUILDKITE_BUILD_CHECKOUT_PATH : "/" ,
13
- BUILDKITE_ORGANIZATION_SLUG : "owner" ,
14
- BUILDKITE_PROJECT_SLUG : "repo" ,
13
+ BUILDKITE_REPO : "git@github.com:owner/repo.git" ,
15
14
} ;
16
15
17
16
test ( "Push" , ( t ) => {
You can’t perform that action at this time.
0 commit comments