MCPcopy Create free account
hub / github.com/gogs/gogs / MergePullRequest

Method MergePullRequest

internal/database/actions.go:269–282  ·  view source on GitHub ↗

MergePullRequest creates an action for merging a pull request.

(ctx context.Context, doer, owner *User, repo *Repository, pull *Issue)

Source from the content-addressed store, hash-verified

267
268// MergePullRequest creates an action for merging a pull request.
269func (s *ActionsStore) MergePullRequest(ctx context.Context, doer, owner *User, repo *Repository, pull *Issue) error {
270 return s.notifyWatchers(ctx,
271 &Action{
272 ActUserID: doer.ID,
273 ActUserName: doer.Name,
274 OpType: ActionMergePullRequest,
275 Content: fmt.Sprintf("%d|%s", pull.Index, pull.Title),
276 RepoID: repo.ID,
277 RepoUserName: owner.Name,
278 RepoName: repo.Name,
279 IsPrivate: repo.IsPrivate || repo.IsUnlisted,
280 },
281 )
282}
283
284// TransferRepo creates an action for transferring a repository to a new owner.
285func (s *ActionsStore) TransferRepo(ctx context.Context, doer, oldOwner, newOwner *User, repo *Repository) error {

Callers 2

actionsMergePullRequestFunction · 0.80
MergeMethod · 0.80

Calls 1

notifyWatchersMethod · 0.95

Tested by 1

actionsMergePullRequestFunction · 0.64