Skip to content

Commit f9eea17

Browse files
authored
Updated email info in gitops commit/push actions (#1609)
* updated email id for gitService commit&push, refactored code to fix cyclic dependencies * updated emailId in commits for all gitOps clients * fixed empty repository issue * wip * updated sql query * updated mail id for devtron bot * code refactoring, review changes * updated script no * review change * removed redundant import * removed import
1 parent ea0161e commit f9eea17

File tree

18 files changed

+233
-92
lines changed

18 files changed

+233
-92
lines changed

214

Whitespace-only changes.

api/appStore/InstalledAppRestHandler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func (handler InstalledAppRestHandlerImpl) GetInstalledAppVersion(w http.Respons
257257
}
258258
token := r.Header.Get("token")
259259
handler.Logger.Infow("request payload, GetInstalledAppVersion", "installedAppVersionId", installedAppId)
260-
dto, err := handler.installedAppService.GetInstalledAppVersion(installedAppId)
260+
dto, err := handler.installedAppService.GetInstalledAppVersion(installedAppId, userId)
261261
if err != nil {
262262
handler.Logger.Errorw("service err, GetInstalledAppVersion", "err", err, "installedAppVersionId", installedAppId)
263263
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
@@ -465,4 +465,4 @@ func (handler *InstalledAppRestHandlerImpl) FetchAppDetailsForInstalledApp(w htt
465465
handler.Logger.Infow("appName and envName not found - avoiding resource tree call", "app", appDetail.AppName, "env", appDetail.EnvironmentName)
466466
}
467467
common.WriteJsonResp(w, err, appDetail, http.StatusOK)
468-
}
468+
}

internal/sql/repository/GitOpsConfigRepository.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type GitOpsConfigRepository interface {
3131
GetGitOpsConfigByProvider(provider string) (*GitOpsConfig, error)
3232
GetGitOpsConfigActive() (*GitOpsConfig, error)
3333
GetConnection() *pg.DB
34+
GetEmailIdFromActiveGitOpsConfig() (string, error)
3435
}
3536

3637
type GitOpsConfigRepositoryImpl struct {
@@ -51,6 +52,7 @@ type GitOpsConfig struct {
5152
Active bool `sql:"active,notnull"`
5253
BitBucketWorkspaceId string `sql:"bitbucket_workspace_id"`
5354
BitBucketProjectKey string `sql:"bitbucket_project_key"`
55+
EmailId string `sql:"email_id"`
5456
sql.AuditLog
5557
}
5658

@@ -99,3 +101,10 @@ func (impl *GitOpsConfigRepositoryImpl) GetGitOpsConfigActive() (*GitOpsConfig,
99101
err := impl.dbConnection.Model(&model).Where("active = ?", true).Limit(1).Select()
100102
return &model, err
101103
}
104+
105+
func (impl *GitOpsConfigRepositoryImpl) GetEmailIdFromActiveGitOpsConfig() (string, error) {
106+
var emailId string
107+
err := impl.dbConnection.Model((*GitOpsConfig)(nil)).Column("email_id").
108+
Where("active = ?", true).Select(&emailId)
109+
return emailId, err
110+
}

internal/util/ChartService.go

Lines changed: 60 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ package util
1919

2020
import (
2121
"fmt"
22+
"github.com/devtron-labs/devtron/internal/sql/repository"
2223
appStoreBean "github.com/devtron-labs/devtron/pkg/appStore/bean"
24+
repository2 "github.com/devtron-labs/devtron/pkg/user/repository"
2325
"github.com/devtron-labs/devtron/util"
2426
"io/ioutil"
2527
"math/rand"
@@ -42,21 +44,24 @@ import (
4244
type ChartWorkingDir string
4345

4446
type ChartTemplateService interface {
45-
CreateChart(chartMetaData *chart.Metadata, refChartLocation string, templateName string) (*ChartValues, *ChartGitAttribute, error)
47+
CreateChart(chartMetaData *chart.Metadata, refChartLocation string, templateName string, userId int32) (*ChartValues, *ChartGitAttribute, error)
4648
GetChartVersion(location string) (string, error)
4749
CreateChartProxy(chartMetaData *chart.Metadata, refChartLocation string, templateName string, version string, envName string, installAppVersionRequest *appStoreBean.InstallAppVersionDTO) (string, *ChartGitAttribute, error)
4850
GitPull(clonedDir string, repoUrl string, appStoreName string) error
4951
GetDir() string
52+
GetUserEmailIdAndNameForGitOpsCommit(userId int32) (emailId, name string)
5053
GetGitOpsRepoName(appName string) string
5154
GetGitOpsRepoNameFromUrl(gitRepoUrl string) string
5255
}
5356
type ChartTemplateServiceImpl struct {
54-
randSource rand.Source
55-
logger *zap.SugaredLogger
56-
chartWorkingDir ChartWorkingDir
57-
gitFactory *GitFactory
58-
client *http.Client
59-
globalEnvVariables *util.GlobalEnvVariables
57+
randSource rand.Source
58+
logger *zap.SugaredLogger
59+
chartWorkingDir ChartWorkingDir
60+
gitFactory *GitFactory
61+
client *http.Client
62+
globalEnvVariables *util.GlobalEnvVariables
63+
gitOpsConfigRepository repository.GitOpsConfigRepository
64+
userRepository repository2.UserRepository
6065
}
6166

6267
type ChartValues struct {
@@ -71,14 +76,18 @@ type ChartValues struct {
7176
func NewChartTemplateServiceImpl(logger *zap.SugaredLogger,
7277
chartWorkingDir ChartWorkingDir,
7378
client *http.Client,
74-
gitFactory *GitFactory, globalEnvVariables *util.GlobalEnvVariables) *ChartTemplateServiceImpl {
79+
gitFactory *GitFactory, globalEnvVariables *util.GlobalEnvVariables,
80+
gitOpsConfigRepository repository.GitOpsConfigRepository,
81+
userRepository repository2.UserRepository) *ChartTemplateServiceImpl {
7582
return &ChartTemplateServiceImpl{
76-
randSource: rand.NewSource(time.Now().UnixNano()),
77-
logger: logger,
78-
chartWorkingDir: chartWorkingDir,
79-
client: client,
80-
gitFactory: gitFactory,
81-
globalEnvVariables: globalEnvVariables,
83+
randSource: rand.NewSource(time.Now().UnixNano()),
84+
logger: logger,
85+
chartWorkingDir: chartWorkingDir,
86+
client: client,
87+
gitFactory: gitFactory,
88+
globalEnvVariables: globalEnvVariables,
89+
gitOpsConfigRepository: gitOpsConfigRepository,
90+
userRepository: userRepository,
8291
}
8392
}
8493

@@ -107,7 +116,7 @@ func (impl ChartTemplateServiceImpl) GetChartVersion(location string) (string, e
107116
return chartContent.Version, nil
108117
}
109118

110-
func (impl ChartTemplateServiceImpl) CreateChart(chartMetaData *chart.Metadata, refChartLocation string, templateName string) (*ChartValues, *ChartGitAttribute, error) {
119+
func (impl ChartTemplateServiceImpl) CreateChart(chartMetaData *chart.Metadata, refChartLocation string, templateName string, userId int32) (*ChartValues, *ChartGitAttribute, error) {
111120
chartMetaData.ApiVersion = "v1" // ensure always v1
112121
dir := impl.GetDir()
113122
chartDir := filepath.Join(string(impl.chartWorkingDir), dir)
@@ -137,7 +146,7 @@ func (impl ChartTemplateServiceImpl) CreateChart(chartMetaData *chart.Metadata,
137146
}
138147
values.Values = valuesYaml
139148
gitOpsRepoName := impl.GetGitOpsRepoName(chartMetaData.Name)
140-
chartGitAttr, err := impl.createAndPushToGit(gitOpsRepoName, templateName, chartMetaData.Version, chartDir)
149+
chartGitAttr, err := impl.createAndPushToGit(gitOpsRepoName, templateName, chartMetaData.Version, chartDir, userId)
141150
if err != nil {
142151
impl.logger.Errorw("error in pushing chart to git ", "path", archivePath, "err", err)
143152
return nil, nil, err
@@ -155,7 +164,7 @@ type ChartGitAttribute struct {
155164
RepoUrl, ChartLocation string
156165
}
157166

158-
func (impl ChartTemplateServiceImpl) createAndPushToGit(gitOpsRepoName, baseTemplateName, version, tmpChartLocation string) (chartGitAttribute *ChartGitAttribute, err error) {
167+
func (impl ChartTemplateServiceImpl) createAndPushToGit(gitOpsRepoName, baseTemplateName, version, tmpChartLocation string, userId int32) (chartGitAttribute *ChartGitAttribute, err error) {
159168
//baseTemplateName replace whitespace
160169
space := regexp.MustCompile(`\s+`)
161170
gitOpsRepoName = space.ReplaceAllString(gitOpsRepoName, "-")
@@ -170,7 +179,9 @@ func (impl ChartTemplateServiceImpl) createAndPushToGit(gitOpsRepoName, baseTemp
170179
return nil, err
171180
}
172181
}
173-
repoUrl, _, detailedError := impl.gitFactory.Client.CreateRepository(gitOpsRepoName, fmt.Sprintf("helm chart for "+gitOpsRepoName), gitOpsConfigBitbucket.BitBucketWorkspaceId, gitOpsConfigBitbucket.BitBucketProjectKey)
182+
//getting user name & emailId for commit author data
183+
userEmailId, userName := impl.GetUserEmailIdAndNameForGitOpsCommit(userId)
184+
repoUrl, _, detailedError := impl.gitFactory.Client.CreateRepository(gitOpsRepoName, fmt.Sprintf("helm chart for "+gitOpsRepoName), gitOpsConfigBitbucket.BitBucketWorkspaceId, gitOpsConfigBitbucket.BitBucketProjectKey, userName, userEmailId)
174185

175186
for _, err := range detailedError.StageErrorMap {
176187
if err != nil {
@@ -205,7 +216,7 @@ func (impl ChartTemplateServiceImpl) createAndPushToGit(gitOpsRepoName, baseTemp
205216
impl.logger.Errorw("error copying dir", "err", err)
206217
return nil, nil
207218
}
208-
commit, err := impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit")
219+
commit, err := impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit", userName, userEmailId)
209220
if err != nil {
210221
impl.logger.Errorw("error in pushing git", "err", err)
211222
impl.logger.Warn("re-trying, taking pull and then push again")
@@ -218,7 +229,7 @@ func (impl ChartTemplateServiceImpl) createAndPushToGit(gitOpsRepoName, baseTemp
218229
impl.logger.Errorw("error copying dir", "err", err)
219230
return nil, err
220231
}
221-
commit, err = impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit")
232+
commit, err = impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit", userName, userEmailId)
222233
if err != nil {
223234
impl.logger.Errorw("error in pushing git", "err", err)
224235
return nil, err
@@ -411,7 +422,9 @@ func (impl ChartTemplateServiceImpl) createAndPushToGitChartProxy(appStoreName,
411422
return nil, err
412423
}
413424
}
414-
repoUrl, _, detailedError := impl.gitFactory.Client.CreateRepository(installAppVersionRequest.GitOpsRepoName, "helm chart for "+installAppVersionRequest.GitOpsRepoName, gitOpsConfigBitbucket.BitBucketWorkspaceId, gitOpsConfigBitbucket.BitBucketProjectKey)
425+
//getting user name & emailId for commit author data
426+
userEmailId, userName := impl.GetUserEmailIdAndNameForGitOpsCommit(installAppVersionRequest.UserId)
427+
repoUrl, _, detailedError := impl.gitFactory.Client.CreateRepository(installAppVersionRequest.GitOpsRepoName, "helm chart for "+installAppVersionRequest.GitOpsRepoName, gitOpsConfigBitbucket.BitBucketWorkspaceId, gitOpsConfigBitbucket.BitBucketProjectKey, userName, userEmailId)
415428
for _, err := range detailedError.StageErrorMap {
416429
if err != nil {
417430
impl.logger.Errorw("error in creating git project", "name", installAppVersionRequest.GitOpsRepoName, "err", err)
@@ -445,7 +458,7 @@ func (impl ChartTemplateServiceImpl) createAndPushToGitChartProxy(appStoreName,
445458
impl.logger.Errorw("error copying dir", "err", err)
446459
return nil, err
447460
}
448-
commit, err := impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit")
461+
commit, err := impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit", userName, userEmailId)
449462
if err != nil {
450463
impl.logger.Errorw("error in pushing git", "err", err)
451464
impl.logger.Warn("re-trying, taking pull and then push again")
@@ -458,7 +471,7 @@ func (impl ChartTemplateServiceImpl) createAndPushToGitChartProxy(appStoreName,
458471
impl.logger.Errorw("error copying dir", "err", err)
459472
return nil, err
460473
}
461-
commit, err = impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit")
474+
commit, err = impl.gitFactory.gitService.CommitAndPushAllChanges(clonedDir, "first commit", userName, userEmailId)
462475
if err != nil {
463476
impl.logger.Errorw("error in pushing git", "err", err)
464477
return nil, err
@@ -483,6 +496,30 @@ func (impl ChartTemplateServiceImpl) GitPull(clonedDir string, repoUrl string, a
483496
return nil
484497
}
485498

499+
func (impl *ChartTemplateServiceImpl) GetUserEmailIdAndNameForGitOpsCommit(userId int32) (string, string) {
500+
emailId := "[email protected]"
501+
name := "devtron bot"
502+
//getting emailId associated with user
503+
userDetail, _ := impl.userRepository.GetById(userId)
504+
if userDetail != nil && userDetail.EmailId != "admin" && userDetail.EmailId != "system" && len(userDetail.EmailId) > 0 {
505+
emailId = userDetail.EmailId
506+
} else {
507+
emailIdGitOps, err := impl.gitOpsConfigRepository.GetEmailIdFromActiveGitOpsConfig()
508+
if err != nil {
509+
impl.logger.Errorw("error in getting emailId from active gitOps config", "err", err)
510+
} else if len(emailIdGitOps) > 0 {
511+
emailId = emailIdGitOps
512+
}
513+
}
514+
//we are getting name from emailId(replacing special characters in <user-name part of email> with space)
515+
emailComponents := strings.Split(emailId, "@")
516+
regex, _ := regexp.Compile(`[^\w]`)
517+
if regex != nil {
518+
name = regex.ReplaceAllString(emailComponents[0], " ")
519+
}
520+
return emailId, name
521+
}
522+
486523
func (impl ChartTemplateServiceImpl) GetGitOpsRepoName(appName string) string {
487524
var repoName string
488525
if len(impl.globalEnvVariables.GitOpsRepoPrefix) == 0 {

internal/util/GitService.go

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const (
5757
)
5858

5959
type GitClient interface {
60-
CreateRepository(name, description, bitbucketWorkspaceId, bitbucketProjectKey string) (url string, isNew bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions)
60+
CreateRepository(name, description, bitbucketWorkspaceId, bitbucketProjectKey, userName, userEmailId string) (url string, isNew bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions)
6161
CommitValues(config *ChartConfig, bitbucketWorkspaceId string) (commitHash string, err error)
6262
GetRepoUrl(projectName string, repoOptions *bitbucket.RepositoryOptions) (repoUrl string, err error)
6363
DeleteRepository(name, userName, gitHubOrgName, azureProjectName string, repoOptions *bitbucket.RepositoryOptions) error
@@ -301,7 +301,7 @@ func (impl GitLabClient) DeleteRepository(name, userName, gitHubOrgName, azurePr
301301
}
302302
return err
303303
}
304-
func (impl GitLabClient) CreateRepository(name, description, bitbucketWorkspaceId, bitbucketProjectKey string) (url string, isNew bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) {
304+
func (impl GitLabClient) CreateRepository(name, description, bitbucketWorkspaceId, bitbucketProjectKey, userName, userEmailId string) (url string, isNew bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) {
305305
detailedErrorGitOpsConfigActions.StageErrorMap = make(map[string]error)
306306
impl.logger.Debugw("gitlab app create request ", "name", name, "description", description)
307307
repoUrl, err := impl.GetRepoUrl(name, nil)
@@ -333,7 +333,7 @@ func (impl GitLabClient) CreateRepository(name, description, bitbucketWorkspaceI
333333
return "", true, detailedErrorGitOpsConfigActions
334334
}
335335
detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneHttpStage)
336-
_, err = impl.createReadme(impl.config.GitlabGroupPath, name)
336+
_, err = impl.createReadme(impl.config.GitlabGroupPath, name, userName, userEmailId)
337337
if err != nil {
338338
impl.logger.Errorw("error in creating readme ", "gitlab project", name, "err", err)
339339
detailedErrorGitOpsConfigActions.StageErrorMap[CreateReadmeStage] = err
@@ -436,11 +436,13 @@ func (impl GitLabClient) GetRepoUrl(projectName string, repoOptions *bitbucket.R
436436
return "", nil
437437
}
438438

439-
func (impl GitLabClient) createReadme(namespace, projectName string) (res interface{}, err error) {
439+
func (impl GitLabClient) createReadme(namespace, projectName, userName, userEmailId string) (res interface{}, err error) {
440440
actions := &gitlab.CreateCommitOptions{
441441
Branch: gitlab.String("master"),
442442
CommitMessage: gitlab.String("test commit"),
443443
Actions: []*gitlab.CommitAction{{Action: gitlab.FileCreate, FilePath: "README.md", Content: "devtron licence"}},
444+
AuthorEmail: &userEmailId,
445+
AuthorName: &userName,
444446
}
445447
c, _, err := impl.client.Commits.CreateCommit(fmt.Sprintf("%s/%s", namespace, projectName), actions)
446448
return c, err
@@ -464,6 +466,8 @@ func (impl GitLabClient) CommitValues(config *ChartConfig, bitbucketWorkspaceId
464466
Branch: &branch,
465467
CommitMessage: gitlab.String(config.ReleaseMessage),
466468
Actions: []*gitlab.CommitAction{{Action: fileAction, FilePath: path, Content: config.FileContent}},
469+
AuthorEmail: &config.UserEmailId,
470+
AuthorName: &config.UserName,
467471
}
468472
c, _, err := impl.client.Commits.CreateCommit(fmt.Sprintf("%s/%s", impl.config.GitlabGroupPath, config.ChartRepoName), actions)
469473
if err != nil {
@@ -479,12 +483,14 @@ type ChartConfig struct {
479483
FileContent string
480484
ReleaseMessage string
481485
ChartRepoName string
486+
UserName string
487+
UserEmailId string
482488
}
483489

484490
//-------------------- go-git integration -------------------
485491
type GitService interface {
486492
Clone(url, targetDir string) (clonedDir string, err error)
487-
CommitAndPushAllChanges(repoRoot, commitMsg string) (commitHash string, err error)
493+
CommitAndPushAllChanges(repoRoot, commitMsg, name, emailId string) (commitHash string, err error)
488494
ForceResetHead(repoRoot string) (err error)
489495
CommitValues(config *ChartConfig) (commitHash string, err error)
490496

@@ -527,7 +533,7 @@ func (impl GitServiceImpl) Clone(url, targetDir string) (clonedDir string, err e
527533
return clonedDir, nil
528534
}
529535

530-
func (impl GitServiceImpl) CommitAndPushAllChanges(repoRoot, commitMsg string) (commitHash string, err error) {
536+
func (impl GitServiceImpl) CommitAndPushAllChanges(repoRoot, commitMsg, name, emailId string) (commitHash string, err error) {
531537
repo, workTree, err := impl.getRepoAndWorktree(repoRoot)
532538
if err != nil {
533539
return "", err
@@ -539,8 +545,13 @@ func (impl GitServiceImpl) CommitAndPushAllChanges(repoRoot, commitMsg string) (
539545
//-- commit
540546
commit, err := workTree.Commit(commitMsg, &git.CommitOptions{
541547
Author: &object.Signature{
542-
Name: "Devtron Boat",
543-
Email: "[email protected]/devtron-labs",
548+
Name: name,
549+
Email: emailId,
550+
When: time.Now(),
551+
},
552+
Committer: &object.Signature{
553+
Name: name,
554+
Email: emailId,
544555
When: time.Now(),
545556
},
546557
})
@@ -592,7 +603,7 @@ func (impl GitServiceImpl) CommitValues(config *ChartConfig) (commitHash string,
592603
if err != nil {
593604
return "", err
594605
}
595-
hash, err := impl.CommitAndPushAllChanges(gitDir, config.ReleaseMessage)
606+
hash, err := impl.CommitAndPushAllChanges(gitDir, config.ReleaseMessage, "devtron bot", "[email protected]")
596607
return hash, err
597608
}
598609

@@ -658,7 +669,7 @@ func (impl GitHubClient) DeleteRepository(name, userName, gitHubOrgName, azurePr
658669
}
659670
return nil
660671
}
661-
func (impl GitHubClient) CreateRepository(name, description, bitbucketWorkspaceId, bitbucketProjectKey string) (url string, isNew bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) {
672+
func (impl GitHubClient) CreateRepository(name, description, bitbucketWorkspaceId, bitbucketProjectKey, userName, userEmailId string) (url string, isNew bool, detailedErrorGitOpsConfigActions DetailedErrorGitOpsConfigActions) {
662673
detailedErrorGitOpsConfigActions.StageErrorMap = make(map[string]error)
663674
ctx := context.Background()
664675
repoExists := true
@@ -705,7 +716,7 @@ func (impl GitHubClient) CreateRepository(name, description, bitbucketWorkspaceI
705716
}
706717
detailedErrorGitOpsConfigActions.SuccessfulStages = append(detailedErrorGitOpsConfigActions.SuccessfulStages, CloneHttpStage)
707718

708-
_, err = impl.createReadme(name)
719+
_, err = impl.createReadme(name, userName, userEmailId)
709720
if err != nil {
710721
impl.logger.Errorw("error in creating readme github", "project", name, "err", err)
711722
detailedErrorGitOpsConfigActions.StageErrorMap[CreateReadmeStage] = err
@@ -728,14 +739,16 @@ func (impl GitHubClient) CreateRepository(name, description, bitbucketWorkspaceI
728739
return *r.CloneURL, true, detailedErrorGitOpsConfigActions
729740
}
730741

731-
func (impl GitHubClient) createReadme(repoName string) (string, error) {
742+
func (impl GitHubClient) createReadme(repoName, userName, userEmailId string) (string, error) {
732743
cfg := &ChartConfig{
733744
ChartName: repoName,
734745
ChartLocation: "",
735746
FileName: "README.md",
736747
FileContent: "@devtron",
737748
ReleaseMessage: "readme",
738749
ChartRepoName: repoName,
750+
UserName: userName,
751+
UserEmailId: userEmailId,
739752
}
740753
hash, err := impl.CommitValues(cfg, "")
741754
if err != nil {
@@ -763,11 +776,22 @@ func (impl GitHubClient) CommitValues(config *ChartConfig, bitbucketWorkspaceId
763776
if !newFile {
764777
currentSHA = *fc.SHA
765778
}
779+
timeNow := time.Now()
766780
options := &github.RepositoryContentFileOptions{
767781
Message: &config.ReleaseMessage,
768782
Content: []byte(config.FileContent),
769783
SHA: &currentSHA,
770784
Branch: &branch,
785+
Author: &github.CommitAuthor{
786+
Date: &timeNow,
787+
Email: &config.UserEmailId,
788+
Name: &config.UserName,
789+
},
790+
Committer: &github.CommitAuthor{
791+
Date: &timeNow,
792+
Email: &config.UserEmailId,
793+
Name: &config.UserName,
794+
},
771795
}
772796
c, _, err := impl.client.Repositories.CreateFile(ctx, impl.org, config.ChartRepoName, path, options)
773797
if err != nil {

0 commit comments

Comments
 (0)