Skip to content

Commit

Permalink
fix backport
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Jan 20, 2025
1 parent db9fe86 commit 3dd42aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/repository/merge_upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package repository

import (
"context"
"errors"
"fmt"

Expand All @@ -17,7 +18,7 @@ import (
)

// MergeUpstream merges the base repository's default branch into the fork repository's current branch.
func MergeUpstream(ctx reqctx.RequestContext, doer *user_model.User, repo *repo_model.Repository, branch string) (mergeStyle string, err error) {
func MergeUpstream(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, branch string) (mergeStyle string, err error) {
if err = repo.MustNotBeArchived(); err != nil {
return "", err
}
Expand Down Expand Up @@ -84,7 +85,7 @@ type UpstreamDivergingInfo struct {
}

// GetUpstreamDivergingInfo returns the information about the divergence between the fork repository's branch and the base repository's default branch.
func GetUpstreamDivergingInfo(ctx context.Context, forkRepo *repo_model.Repository, forkBranch string) (*BranchDivergingInfo, error) {
func GetUpstreamDivergingInfo(ctx context.Context, forkRepo *repo_model.Repository, forkBranch string) (*UpstreamDivergingInfo, error) {
if !forkRepo.IsFork {
return nil, util.NewInvalidArgumentErrorf("repo is not a fork")
}
Expand Down

0 comments on commit 3dd42aa

Please sign in to comment.