Skip to content

Commit

Permalink
event-reporter: updated app client to support sourceIndex param in no…
Browse files Browse the repository at this point in the history
…n-grpc mode
  • Loading branch information
oleksandr-codefresh committed Oct 1, 2024
1 parent a8cc45e commit 02c14a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions event_reporter/application/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (c *httpApplicationClient) RevisionMetadata(ctx context.Context, in *appcli
params := fmt.Sprintf("?appNamespace=%s&project=%s",
*in.AppNamespace,
*in.Project)
if in.SourceIndex != nil {
params += fmt.Sprintf("&sourceIndex=%d", *in.SourceIndex)
}
url := fmt.Sprintf("%s/api/v1/applications/%s/revisions/%s/metadata%s", c.baseUrl, *in.Name, *in.Revision, params)
revisionMetadata := &v1alpha1.RevisionMetadata{}
err := c.execute(ctx, url, revisionMetadata)
Expand Down

0 comments on commit 02c14a3

Please sign in to comment.