Skip to content

Commit 08262e1

Browse files
committed
pull request functionality
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
1 parent 3f7c7f0 commit 08262e1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

applicationset/generators/pull_request.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"sigs.k8s.io/controller-runtime/pkg/client"
1212

1313
"github.com/gosimple/slug"
14+
log "github.com/sirupsen/logrus"
1415

1516
"github.com/argoproj/argo-cd/v3/applicationset/services"
1617
pullrequest "github.com/argoproj/argo-cd/v3/applicationset/services/pull_request"
@@ -73,10 +74,15 @@ func (g *PullRequestGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha
7374
}
7475

7576
pulls, err := pullrequest.ListPullRequests(ctx, svc, appSetGenerator.PullRequest.Filters)
77+
params := make([]map[string]any, 0, len(pulls))
7678
if err != nil {
79+
if pullrequest.IsRepositoryNotFoundError(err) && g.GetContinueOnRepoNotFoundError(appSetGenerator) {
80+
log.WithError(err).WithField("generator", g).
81+
Warn("Skipping params generation for this repository since it was not found.")
82+
return params, nil
83+
}
7784
return nil, fmt.Errorf("error listing repos: %w", err)
7885
}
79-
params := make([]map[string]any, 0, len(pulls))
8086

8187
// In order to follow the DNS label standard as defined in RFC 1123,
8288
// we need to limit the 'branch' to 50 to give room to append/suffix-ing it

0 commit comments

Comments
 (0)