Skip to content
Snippets Groups Projects

fix: Update GH revalidation logic to use new split repo + org name params

Merged Martin Lowe requested to merge malowe/main/fix-gh-revalidation into main
3 files
+ 14
10
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -120,7 +120,8 @@ public class StatusResource extends CommonResource {
.entity(statusUiTemplate
.data(COMMIT_STATUSES_PARAMETER, statuses)
.data(PULL_REQUEST_NUMBER_PARAMETER, null)
.data("fullRepoName", null)
.data("repoName", null)
.data("orgName", null)
.data("project", ps.isEmpty() ? null : ps.get(0))
.data(REPO_URL_PARAMETER, statuses.get(0).getRepoUrl())
.data("installationId", null)
@@ -144,8 +145,6 @@ public class StatusResource extends CommonResource {
@Path("gh/{org}/{repoName}/{prNo}")
public Response getCommitValidationForGithub(@PathParam("org") String org, @PathParam("repoName") String repoName,
@PathParam("prNo") Integer prNo) {
// get the repo full name, used in a few lookups
String repoFullName = org + '/' + repoName;
// generate the URL used to retrieve valid projects
String repoUrl = GithubValidationHelper.getRepoUrl(org, repoName);
@@ -197,7 +196,8 @@ public class StatusResource extends CommonResource {
.entity(statusUiTemplate
.data(COMMIT_STATUSES_PARAMETER, statuses)
.data(PULL_REQUEST_NUMBER_PARAMETER, prNo)
.data("fullRepoName", repoFullName)
.data("repoName", repoName)
.data("orgName", org)
.data("project", ps.isEmpty() ? null : ps.get(0))
.data(REPO_URL_PARAMETER, repoUrl)
.data("installationId", installationId)
Loading