Skip to content

Commit

Permalink
fix backend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
motatoes committed Jan 10, 2024
1 parent 0e4fff8 commit 58d6700
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/controllers/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,17 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
issueNumber := *payload.Issue.Number

ghService, config, projectsGraph, branch, err := getDiggerConfig(gh, installationId, repoFullName, repoOwner, repoName, cloneURL, issueNumber)

if err != nil {
log.Printf("getDiggerConfig error: %v", err)
return fmt.Errorf("error getting digger config")
}

prBranchName, err := ghService.GetBranchName(issueNumber)
if err != nil {
log.Printf("GetBranchName error: %v", err)
return fmt.Errorf("error while fetching branch name")
}

impactedProjects, requestedProject, _, err := dg_github.ProcessGitHubIssueCommentEvent(payload, config, projectsGraph, ghService)
if err != nil {
log.Printf("Error processing event: %v", err)
Expand All @@ -589,7 +594,7 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
return fmt.Errorf("error getting github prservice")
}

jobs, _, err := dg_github.ConvertGithubIssueCommentEventToJobs(payload, impactedProjects, requestedProject, config.Workflows)
jobs, _, err := dg_github.ConvertGithubIssueCommentEventToJobs(payload, impactedProjects, requestedProject, config.Workflows, prBranchName)

if err != nil {
log.Printf("Error converting event to jobs: %v", err)
Expand Down

0 comments on commit 58d6700

Please sign in to comment.