forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: reporter code splitting (#316)
* v2 reporter: code splitting into different files * v2 reporter: changes after pr review * Makefile: fixed wrong IMAGE_NAMESPACE
- Loading branch information
1 parent
961fd91
commit c0941bc
Showing
14 changed files
with
910 additions
and
830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package reporter | ||
|
||
import ( | ||
"context" | ||
"github.com/argoproj/argo-cd/v2/pkg/apiclient/application" | ||
appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" | ||
) | ||
|
||
func (s *applicationEventReporter) getApplicationRevisionDetails(ctx context.Context, a *appv1.Application, revision string) (*appv1.RevisionMetadata, error) { | ||
project := a.Spec.GetProject() | ||
return s.applicationServiceClient.RevisionMetadata(ctx, &application.RevisionMetadataQuery{ | ||
Name: &a.Name, | ||
AppNamespace: &a.Namespace, | ||
Revision: &revision, | ||
Project: &project, | ||
}) | ||
} |
Oops, something went wrong.