MergePullRequest creates an action for merging a pull request.
(ctx context.Context, doer, owner *User, repo *Repository, pull *Issue)
| 267 | |
| 268 | // MergePullRequest creates an action for merging a pull request. |
| 269 | func (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. |
| 285 | func (s *ActionsStore) TransferRepo(ctx context.Context, doer, oldOwner, newOwner *User, repo *Repository) error { |