@@ -18,18 +18,19 @@ class DifferentialClient(val conduitClient: ConduitClient) {
18
18
* @param message the content of the comment
19
19
* @param silent whether or not to trigger an email
20
20
* @param action phabricator comment action, e.g. 'resign', 'reject', 'none'
21
+ * @param attachInlines whether attach inline comments or not
21
22
* @return the Conduit API response
22
23
* @throws IOException if there is a network error talking to Conduit
23
24
* @throws ConduitException if any error is experienced talking to Conduit
24
25
*/
25
26
@Throws(IOException ::class , ConduitException ::class )
26
- fun postComment (revisionID : String , message : String , silent : Boolean , action : String ): JSONObject {
27
- var params = JSONObject ()
27
+ fun postComment (revisionID : String , message : String , silent : Boolean , action : String , attachInlines : Boolean = true ): JSONObject {
28
+ val params = JSONObject ()
28
29
.put(" revision_id" , revisionID)
29
30
.put(" action" , action)
30
31
.put(" message" , message)
31
32
.put(" silent" , silent)
32
- .put(" attach_inlines" , true )
33
+ .put(" attach_inlines" , attachInlines )
33
34
return conduitClient.perform(" differential.createcomment" , params)
34
35
}
35
36
@@ -64,12 +65,13 @@ class DifferentialClient(val conduitClient: ConduitClient) {
64
65
* Post a comment on the differential
65
66
* @param revisionID the revision ID (e.g. "D1234" without the "D")
66
67
* @param message the string message to post
68
+ * @param attachInlines whether attach inline comments or not
67
69
* @return the Conduit API response
68
70
* @throws ConduitException if any error is experienced talking to Conduit
69
71
*/
70
72
@Throws(ConduitException ::class )
71
- fun postComment (revisionID : String , message : String ): JSONObject {
72
- return postComment(revisionID, message, false , " none" )
73
+ fun postComment (revisionID : String , message : String , attachInlines : Boolean = true ): JSONObject {
74
+ return postComment(revisionID, message, false , " none" , attachInlines )
73
75
}
74
76
75
77
/* *
0 commit comments