diff --git a/src/bcgov/GitHubHelper.groovy b/src/bcgov/GitHubHelper.groovy index 61363ff..b4f9d24 100644 --- a/src/bcgov/GitHubHelper.groovy +++ b/src/bcgov/GitHubHelper.groovy @@ -184,7 +184,7 @@ class GitHubHelper { def ghRepo=getGitHubRepository(url) def ghDeploymentState=GHDeploymentState.valueOf(statusName) - def ghDeploymentStatus=ghRepo.root.retrieve().to(ghRepo.getApiTailUrl("deployments/") + deploymentId, GHDeployment.class).wrap(ghRepo).createStatus(ghDeploymentState) + def ghDeploymentStatus=ghRepo.getDeployment(deploymentId).createStatus(ghDeploymentState) if (deploymentStatusConfig.description){ ghDeploymentStatus.description(deploymentStatusConfig.description) @@ -209,4 +209,4 @@ class GitHubHelper { static void createCommitStatus(CpsScript script, String ref, String statusName, String targetUrl, String description, String context) { createCommitStatus(script.scm.getUserRemoteConfigs()[0].getUrl() as String, ref, statusName, targetUrl, description, context) } -} \ No newline at end of file +}