Rename {Update -> Commit}PullRequestAction to be more accurately named

This commit is contained in:
Keith Rutkowski 2018-04-02 10:02:52 -04:00
parent f4d086b1f5
commit faf860e707
2 changed files with 4 additions and 4 deletions

View File

@ -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)
}

View File

@ -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
}
}