Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions backend/plugins/jenkins/tasks/build_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ package tasks
import (
"encoding/json"
"fmt"
"strings"
"time"

"github.com/apache/incubator-devlake/core/errors"
"github.com/apache/incubator-devlake/core/plugin"
"github.com/apache/incubator-devlake/helpers/pluginhelper/api"
"github.com/apache/incubator-devlake/plugins/jenkins/models"
"strings"
"time"
)

// this struct should be moved to `gitub_api_common.go`
Expand Down Expand Up @@ -75,6 +76,7 @@ func ExtractApiBuilds(taskCtx plugin.SubTaskContext) errors.Error {
}
// we also need to collect the commit info from the build which does not have changeSet
// changeSet describes the changes that were made in the build
// process hudson.plugins.git.util.BuildData
for _, a := range body.Actions {
if a.LastBuiltRevision == nil {
continue
Expand Down Expand Up @@ -103,6 +105,9 @@ func ExtractApiBuilds(taskCtx plugin.SubTaskContext) errors.Error {
results = append(results, &buildCommitRemoteUrl)
}
}
}
// process hudson.model.CauseAction
for _, a := range body.Actions {
if len(a.Causes) > 0 {
for _, cause := range a.Causes {
if cause.UpstreamProject != "" {
Expand Down