Skip to content

Commit

Permalink
Merge pull request #34 from banksean/fix-publish-draft
Browse files Browse the repository at this point in the history
fix Changes.PublishDraftChange
  • Loading branch information
andygrunwald authored Apr 21, 2017
2 parents b61807e + ce7c0c4 commit c73e6ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,12 @@ func (s *ChangesService) DeleteDraftChange(changeID string) (*Response, error) {
// PublishDraftChange publishes a draft change.
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#publish-draft-change
func (s *ChangesService) PublishDraftChange(changeID string) (*Response, error) {
func (s *ChangesService) PublishDraftChange(changeID, notify string) (*Response, error) {
u := fmt.Sprintf("changes/%s/publish", changeID)

req, err := s.client.NewRequest("POST", u, nil)
req, err := s.client.NewRequest("POST", u, map[string]string{
"notify": notify,
})
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c73e6ce

Please sign in to comment.