( ctx context.Context, envContainer app.EnvContainer, input string, gitCommitSha string, )
| 534 | } |
| 535 | |
| 536 | func getGitMetadataLabelsUploadOptions( |
| 537 | ctx context.Context, |
| 538 | envContainer app.EnvContainer, |
| 539 | input string, |
| 540 | gitCommitSha string, |
| 541 | ) (bufmodule.UploadOption, error) { |
| 542 | refs, err := git.GetRefsForGitCommitAndRemote(ctx, envContainer, input, gitOriginRemote, gitCommitSha) |
| 543 | if err != nil { |
| 544 | return nil, err |
| 545 | } |
| 546 | if len(refs) == 0 { |
| 547 | return nil, fmt.Errorf("no tags or branches found for HEAD, %s", gitCommitSha) |
| 548 | } |
| 549 | return bufmodule.UploadWithLabels(refs...), nil |
| 550 | } |
| 551 | |
| 552 | func getLabelUploadOption(flags *flags) bufmodule.UploadOption { |
| 553 | // We do not allow the mixing of flags, so post-validation, we only expect one of the |
no test coverage detected
searching dependent graphs…