Rename {Update -> Commit}PullRequestAction to be more accurately named
This commit is contained in:
parent
f4d086b1f5
commit
faf860e707
|
@ -782,8 +782,8 @@ func NewPullRequestAction(doer *User, repo *Repository, pull *Issue, commits *Pu
|
|||
return nil
|
||||
}
|
||||
|
||||
// UpdatePullRequestAction adds new action for updating or merging a pull request.
|
||||
func UpdatePullRequestAction(doer *User, repo *Repository, pull *Issue, commits *PushCommits) error {
|
||||
// CommitPullRequestAction adds new action for pushed commits tracked by a pull request.
|
||||
func CommitPullRequestAction(doer *User, repo *Repository, commits *PushCommits) error {
|
||||
if err := UpdateIssuesCommit(doer, repo, commits.Commits, false); err != nil {
|
||||
log.Error(4, "UpdateIssuesCommit: %v", err)
|
||||
}
|
||||
|
|
|
@ -334,8 +334,8 @@ func pushUpdate(branch string, opts PushUpdateOptions) (repo *Repository, err er
|
|||
}
|
||||
|
||||
commits := ListToPushCommits(l)
|
||||
if err = UpdatePullRequestAction(pusher, pr.BaseRepo, pr.Issue, commits); err != nil {
|
||||
log.Error(4, "UpdatePullRequestAction [%d]: %v", pr.ID, err)
|
||||
if err = CommitPullRequestAction(pusher, pr.BaseRepo, commits); err != nil {
|
||||
log.Error(4, "CommitPullRequestAction [%d]: %v", pr.ID, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user