mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-06-04 23:12:07 -04:00
s/convertForgejoRepositoryToF3Path/getF3PathOfRepository/
This commit is contained in:
parent
d7d26b16dc
commit
7209b8ce34
1 changed files with 6 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ import (
|
|||
f3_util "code.forgejo.org/f3/gof3/v3/util"
|
||||
)
|
||||
|
||||
func convertForgejoRepositoryToF3Path(ctx context.Context, repository *repo.Repository) (string, error) {
|
||||
func getF3PathOfRepository(ctx context.Context, repository *repo.Repository) (string, error) {
|
||||
if err := repository.LoadOwner(ctx); err != nil {
|
||||
return "", fmt.Errorf("LoadOwner: %w", err)
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ func convertForgejoIssueToF3Path(ctx context.Context, isPull bool, issue *issues
|
|||
if err := issue.LoadRepo(ctx); err != nil {
|
||||
return "", fmt.Errorf("LoadRepo: %w", err)
|
||||
}
|
||||
projectPath, err := convertForgejoRepositoryToF3Path(ctx, issue.Repo)
|
||||
projectPath, err := getF3PathOfRepository(ctx, issue.Repo)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ func convertForgejoReleaseToF3Path(ctx context.Context, release *repo.Release) (
|
|||
if err := release.LoadRepo(ctx); err != nil {
|
||||
return "", fmt.Errorf("LoadRepo: %w", err)
|
||||
}
|
||||
projectPath, err := convertForgejoRepositoryToF3Path(ctx, release.Repo)
|
||||
projectPath, err := getF3PathOfRepository(ctx, release.Repo)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ func convertForgejoLabelToF3Path(ctx context.Context, label *issues.Label) (stri
|
|||
if err != nil {
|
||||
return "", fmt.Errorf("GetRepositoryByID: %w", err)
|
||||
}
|
||||
projectPath, err := convertForgejoRepositoryToF3Path(ctx, repository)
|
||||
projectPath, err := getF3PathOfRepository(ctx, repository)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ func convertForgejoMilestoneToF3Path(ctx context.Context, milestone *issues.Mile
|
|||
if err != nil {
|
||||
return "", fmt.Errorf("GetRepositoryByID: %w", err)
|
||||
}
|
||||
projectPath, err := convertForgejoRepositoryToF3Path(ctx, repository)
|
||||
projectPath, err := getF3PathOfRepository(ctx, repository)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
@ -202,7 +202,7 @@ func convertForgejoReviewToF3Path(ctx context.Context, review *issues.Review) (s
|
|||
func ConvertForgejoToF3Path(ctx context.Context, some any) (string, error) {
|
||||
switch o := some.(type) {
|
||||
case *repo.Repository:
|
||||
return convertForgejoRepositoryToF3Path(ctx, o)
|
||||
return getF3PathOfRepository(ctx, o)
|
||||
case *organization.Organization:
|
||||
return f3_tree.NewOrganizationPathString(o.Name), nil
|
||||
case *user.User:
|
||||
|
|
|
|||
Loading…
Reference in a new issue