Skip to content

Commit

Permalink
rebase to resolve conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Ulmer <[email protected]>
  • Loading branch information
Ulminator committed Jan 24, 2025
1 parent 222362c commit d437256
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion server/events/project_command_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ func (p *DefaultProjectCommandBuilder) shouldSkipClone(ctx *command.Context, mod
return false, nil
}
repoCfgFile := p.GlobalCfg.RepoConfigFile(ctx.Pull.BaseRepo.ID())
hasRepoCfg, repoCfgData, err := p.VCSClient.GetFileContent(ctx.Log, ctx.Pull, repoCfgFile)
ctx.Log.Debug("Getting file content for file '%s' of pull request %d", repoCfgFile, ctx.Pull.Num)
hasRepoCfg, repoCfgData, err := p.VCSClient.GetFileContent(ctx.Log, ctx.HeadRepo, ctx.Pull.HeadBranch, repoCfgFile)

if err != nil {
return false, errors.Wrapf(err, "downloading %s", repoCfgFile)
}
Expand Down
1 change: 0 additions & 1 deletion server/events/vcs/gitlab_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ func (g *GitlabClient) GetTeamNamesForUser(_ models.Repo, _ models.User) ([]stri
// The first return value indicates whether the repo contains a file or not
// if BaseRepo had a file, its content will placed on the second return value
func (g *GitlabClient) GetFileContent(logger logging.SimpleLogging, repo models.Repo, branch string, fileName string) (bool, []byte, error) {
logger.Debug("Getting GitLab file content for file '%s'", fileName)
opt := gitlab.GetRawFileOptions{Ref: gitlab.Ptr(branch)}

bytes, resp, err := g.Client.RepositoryFiles.GetRawFile(repo.FullName, fileName, &opt)
Expand Down

0 comments on commit d437256

Please sign in to comment.