File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1- import { head } from "../lib/git.js" ;
1+ import { getSlugFromGitURL , head } from "../lib/git.js" ;
22
33// https://wiki.jenkins.io/display/JENKINS/Building+a+software+project
44
@@ -18,6 +18,7 @@ export default {
1818 return {
1919 name : "Jenkins" ,
2020 service : "jenkins" ,
21+ slug : getSlugFromGitURL ( env . GIT_URL ) ,
2122 commit : env . ghprbActualCommit || env . GIT_COMMIT || head ( { env, cwd } ) ,
2223 branch : isPr
2324 ? env . ghprbTargetBranch || env . gitlabTargetBranch
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import jenkins from "../../services/jenkins.js";
33
44const env = {
55 JENKINS_URL : "http://jenkins.jenkins.example/" ,
6+ GIT_URL : "https://github.com/user/repo.git" ,
67 GIT_COMMIT : "5678" ,
78 BUILD_NUMBER : "91011" ,
89 BUILD_URL : "http://jenkins.jenkins.example/buildResult" ,
@@ -15,6 +16,7 @@ test("Push", (t) => {
1516 {
1617 name : "Jenkins" ,
1718 service : "jenkins" ,
19+ slug : "user/repo" ,
1820 commit : "5678" ,
1921 build : "91011" ,
2022 buildUrl : "http://jenkins.jenkins.example/buildResult" ,
@@ -35,6 +37,7 @@ test("PR", (t) => {
3537 {
3638 name : "Jenkins" ,
3739 service : "jenkins" ,
40+ slug : "user/repo" ,
3841 commit : "5678" ,
3942 build : "91011" ,
4043 buildUrl : "http://jenkins.jenkins.example/buildResult" ,
@@ -60,6 +63,7 @@ test("PR (PR ghprb-plugin)", (t) => {
6063 {
6164 name : "Jenkins" ,
6265 service : "jenkins" ,
66+ slug : "user/repo" ,
6367 commit : "5678" ,
6468 build : "91011" ,
6569 buildUrl : "http://jenkins.jenkins.example/buildResult" ,
@@ -85,6 +89,7 @@ test("PR (gitlab-plugin)", (t) => {
8589 {
8690 name : "Jenkins" ,
8791 service : "jenkins" ,
92+ slug : "user/repo" ,
8893 commit : "5678" ,
8994 build : "91011" ,
9095 buildUrl : "http://jenkins.jenkins.example/buildResult" ,
You can’t perform that action at this time.
0 commit comments