launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24072
[Merge] ~ilasc/launchpad:bug-530505 into launchpad:master
Ioana Lasc has proposed merging ~ilasc/launchpad:bug-530505 into launchpad:master.
Commit message:
Made Subject not required in apidoc parameters for branch_merge_proposal.createComment.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #530505 in Launchpad itself: "branch_merge_proposal.createComment requires a subject, which is pointless"
https://bugs.launchpad.net/launchpad/+bug/530505
For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/374197
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:bug-530505 into launchpad:master.
diff --git a/lib/lp/code/interfaces/branchmergeproposal.py b/lib/lp/code/interfaces/branchmergeproposal.py
index 54bef77..fa37faf 100644
--- a/lib/lp/code/interfaces/branchmergeproposal.py
+++ b/lib/lp/code/interfaces/branchmergeproposal.py
@@ -692,7 +692,7 @@ class IBranchMergeProposalAnyAllowedPerson(IBugLinkTarget):
@call_with(owner=REQUEST_USER)
# ICodeReviewComment supplied as Interface to avoid circular imports.
@export_factory_operation(Interface, [])
- def createComment(owner, subject, content=None, vote=None,
+ def createComment(owner, subject=None, content=None, vote=None,
review_type=None, parent=None,
previewdiff_id=None, inline_comments=None):
"""Create an ICodeReviewComment associated with this merge proposal.
diff --git a/lib/lp/code/model/branchmergeproposal.py b/lib/lp/code/model/branchmergeproposal.py
index 0241e7c..5ebcf04 100644
--- a/lib/lp/code/model/branchmergeproposal.py
+++ b/lib/lp/code/model/branchmergeproposal.py
@@ -998,7 +998,7 @@ class BranchMergeProposal(SQLBase, BugLinkTargetMixin):
stop=self.target_git_commit_sha1,
union_repository=self.target_git_repository)
- def createComment(self, owner, subject, content=None, vote=None,
+ def createComment(self, owner, subject=None, content=None, vote=None,
review_type=None, parent=None, _date_created=DEFAULT,
previewdiff_id=None, inline_comments=None,
_notify_listeners=True):
diff --git a/lib/lp/services/webservice/stories/apidoc.txt b/lib/lp/services/webservice/stories/apidoc.txt
index 176071c..d53dadc 100644
--- a/lib/lp/services/webservice/stories/apidoc.txt
+++ b/lib/lp/services/webservice/stories/apidoc.txt
@@ -22,3 +22,34 @@ http://launchpad.test/+apidoc/{version}.html.
>>> print browser.title
About this service
+Test the Subject is not a required parameter for branch_merge_proposal
+createComment in apidoc (bug 530505).
+
+ >>> browser.open('http://launchpad.test/+apidoc/devel.html#branch_merge_proposal')
+ >>> print extract_text(browser.contents)
+ About this service
+ ...
+ branch_merge_proposal
+ ...
+ createComment
+ ...
+ ws.op
+ (required)
+ Fixed: createComment
+ content
+ inline_comments
+ parent
+ Link to a code_review_comment.
+ previewdiff_id
+ review_type
+ subject
+ vote
+ One of:
+ Approve
+ Needs Fixing
+ Needs Information
+ Abstain
+ Disapprove
+ Resubmit
+ On success, the response status will be 201
+ ...