marcoabreu closed pull request #13350: Fix github status context if running 
inside a folder
URL: https://github.com/apache/incubator-mxnet/pull/13350
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ci/Jenkinsfile_utils.groovy b/ci/Jenkinsfile_utils.groovy
index 8794ad301ce..007c55979b9 100644
--- a/ci/Jenkinsfile_utils.groovy
+++ b/ci/Jenkinsfile_utils.groovy
@@ -195,8 +195,8 @@ def update_github_commit_status(state, message) {
 
 def get_github_context() {
   // Since we use multi-branch pipelines, Jenkins appends the branch name to 
the job name
-  if (JOB_NAME.contains('/')) {
-    short_job_name = JOB_NAME.split('/')[0] 
+  if (env.BRANCH_NAME) {
+    short_job_name = JOB_NAME.substring(0, JOB_NAME.lastIndexOf('/')) 
   } else {
     short_job_name = JOB_NAME
   }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to