diff --git a/controllers/component_dependency_update_controller_test.go b/controllers/component_dependency_update_controller_test.go index 72adaf5f..87f8ca59 100644 --- a/controllers/component_dependency_update_controller_test.go +++ b/controllers/component_dependency_update_controller_test.go @@ -685,6 +685,7 @@ var _ = Describe("Component nudge controller", func() { distributionRepositories := []string{"registry.redhat.com/some-product", "registry.redhat.com/other-product"} matchPackageNames := []string{buildImageRepository, distributionRepositories[0], distributionRepositories[1]} registryAliases := map[string]string{distributionRepositories[0]: buildImageRepository, distributionRepositories[1]: buildImageRepository} + labels := []string{"konflux-nudge"} buildResult := BuildResult{ BuiltImageRepository: buildImageRepository, @@ -722,6 +723,7 @@ var _ = Describe("Component nudge controller", func() { Expect(resultConfig.PackageRules[1].FollowTag).Should(Equal(builtImageTag)) Expect(resultConfig.PackageRules[1].MatchPackageNames).Should(Equal(matchPackageNames)) Expect(resultConfig.RegistryAliases).Should(Equal(registryAliases)) + Expect(resultConfig.Labels).Should(Equal(labels)) }) }) diff --git a/controllers/renovate_util.go b/controllers/renovate_util.go index 92f282d0..bc11dc2b 100644 --- a/controllers/renovate_util.go +++ b/controllers/renovate_util.go @@ -106,6 +106,7 @@ type RenovateConfig struct { ForkProcessing string `json:"forkProcessing"` Extends []string `json:"extends"` DependencyDashboard bool `json:"dependencyDashboard"` + Labels []string `json:"labels"` } var DisableAllPackageRules = PackageRule{MatchPackagePatterns: []string{"*"}, Enabled: false} @@ -275,7 +276,8 @@ func (u ComponentDependenciesUpdater) GetUpdateTargetsGithubApp(ctx context.Cont ComponentName: component.Name, GitProvider: gitProvider, Username: fmt.Sprintf("%s[bot]", slug), - GitAuthor: fmt.Sprintf("%s <%d+%s[bot]@users.noreply.github.com>", slug, githubAppInstallation.ID, slug), + // hardcoding the number because mintmaker has it hardcoded as well, so that way mintmaker will recognize the same author + GitAuthor: fmt.Sprintf("%s <126015336+%s[bot]@users.noreply.github.com>", slug, slug), Token: githubAppInstallation.Token, Endpoint: git.BuildAPIEndpoint("github").APIEndpoint("github.com"), Repositories: repositories, @@ -349,6 +351,7 @@ func generateRenovateConfigForNudge(target updateTarget, buildResult *BuildResul ForkProcessing: "enabled", Extends: []string{":gitSignOff"}, DependencyDashboard: false, + Labels: []string{"konflux-nudge"}, } return renovateConfig, nil