Skip to content

Commit

Permalink
Pass installation id to pr revision activities (#716)
Browse files Browse the repository at this point in the history
Missed this workflow when migrating over to static ids in previous PR.
  • Loading branch information
samrabelachew authored Jul 20, 2023
1 parent 54778ce commit fcd0d39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions server/neptune/lyft/activities/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import (
)

type Github struct {
ClientCreator githubapp.ClientCreator
ClientCreator githubapp.ClientCreator
InstallationID int64
}

type ListPRsRequest struct {
Expand All @@ -29,7 +30,7 @@ type ListPRsResponse struct {

func (a *Github) GithubListPRs(ctx context.Context, request ListPRsRequest) (ListPRsResponse, error) {
prs, err := a.listPullRequests(
ctx, request.Repo.Credentials.InstallationToken,
ctx, a.InstallationID,
request.Repo.Owner,
request.Repo.Name,
request.Repo.DefaultBranch,
Expand Down Expand Up @@ -65,7 +66,7 @@ type ListModifiedFilesResponse struct {

func (a *Github) GithubListModifiedFiles(ctx context.Context, request ListModifiedFilesRequest) (ListModifiedFilesResponse, error) {
files, err := a.listModifiedFiles(
ctx, request.Repo.Credentials.InstallationToken,
ctx, a.InstallationID,
request.Repo.Owner,
request.Repo.Name,
request.PullRequest.Number,
Expand Down
3 changes: 2 additions & 1 deletion server/neptune/temporalworker/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ func NewServer(config *config.Config) (*Server, error) {
}

prRevisionGithubActivities := &lyftActivities.Github{
ClientCreator: clientCreator,
ClientCreator: clientCreator,
InstallationID: config.GithubCfg.TemporalAppInstallationID,
}

cronScheduler := internalSync.NewCronScheduler(config.CtxLogger)
Expand Down

0 comments on commit fcd0d39

Please sign in to comment.