@@ -242,42 +242,42 @@ func TestExecParseComment(t *testing.T) {
242242 expectCommentUpdate bool
243243 expectCommentCreate bool
244244 }{
245- // "reassign-reviewer with hyphen and specific user": {
246- // comment: "LGTM! @modular-magician reassign-reviewer alice",
247- // existingComments: []github.PullRequestComment{
248- // {
249- // Body: github.FormatReviewerComment("bob"),
250- // ID: 1234,
251- // },
252- // },
253- // expectSpecificReviewers: []string{"alice"},
254- // expectRemovedReviewers: []string{"bob"},
255- // expectCommentUpdate: true,
256- // },
257- // "reassign to random reviewer (no username specified)": {
258- // comment: "@modular-magician reassign-reviewer",
259- // existingComments: []github.PullRequestComment{
260- // {
261- // Body: github.FormatReviewerComment("george"),
262- // ID: 3456,
263- // },
264- // },
265- // expectRemovedReviewers: []string{"george"},
266- // expectCommentUpdate: true,
267- // // Can't check specific reviewer since it's random
268- // },
269- // "multiple @modular-magician invocations (only first processed)": {
270- // comment: "@modular-magician reassign-reviewer larry\n@modular-magician reassign-reviewer mary",
271- // existingComments: []github.PullRequestComment{
272- // {
273- // Body: github.FormatReviewerComment("nancy"),
274- // ID: 1111,
275- // },
276- // },
277- // expectSpecificReviewers: []string{"larry"}, // Only larry, not mary
278- // expectRemovedReviewers: []string{"nancy"},
279- // expectCommentUpdate: true,
280- // },
245+ "reassign-reviewer with hyphen and specific user" : {
246+ comment : "LGTM! @modular-magician reassign-reviewer alice" ,
247+ existingComments : []github.PullRequestComment {
248+ {
249+ Body : github .FormatReviewerComment ("bob" ),
250+ ID : 1234 ,
251+ },
252+ },
253+ expectSpecificReviewers : []string {"alice" },
254+ expectRemovedReviewers : []string {"bob" },
255+ expectCommentUpdate : true ,
256+ },
257+ "reassign to random reviewer (no username specified)" : {
258+ comment : "@modular-magician reassign-reviewer" ,
259+ existingComments : []github.PullRequestComment {
260+ {
261+ Body : github .FormatReviewerComment ("george" ),
262+ ID : 3456 ,
263+ },
264+ },
265+ expectRemovedReviewers : []string {"george" },
266+ expectCommentUpdate : true ,
267+ // Can't check specific reviewer since it's random
268+ },
269+ "multiple @modular-magician invocations (only first processed)" : {
270+ comment : "@modular-magician reassign-reviewer larry\n @modular-magician reassign-reviewer mary" ,
271+ existingComments : []github.PullRequestComment {
272+ {
273+ Body : github .FormatReviewerComment ("nancy" ),
274+ ID : 1111 ,
275+ },
276+ },
277+ expectSpecificReviewers : []string {"larry" }, // Only larry, not mary
278+ expectRemovedReviewers : []string {"nancy" },
279+ expectCommentUpdate : true ,
280+ },
281281 "no @modular-magician invocation" : {
282282 comment : "Just a regular comment without magician" ,
283283 expectNoAction : true ,
@@ -290,23 +290,23 @@ func TestExecParseComment(t *testing.T) {
290290 comment : "@modular-magician cherry-pick branch-xyz" ,
291291 expectNoAction : true ,
292292 },
293- // "command in middle of multi-line comment": {
294- // comment: `This looks good to me.
295- // LGTM!
293+ "command in middle of multi-line comment" : {
294+ comment : `This looks good to me.
295+ LGTM!
296296
297- // @modular-magician reassign-reviewer rachel
297+ @modular-magician reassign-reviewer rachel
298298
299- // Thanks for the great work!`,
300- // existingComments: []github.PullRequestComment{
301- // {
302- // Body: github.FormatReviewerComment("steve"),
303- // ID: 3333,
304- // },
305- // },
306- // expectSpecificReviewers: []string{"rachel"},
307- // expectRemovedReviewers: []string{"steve"},
308- // expectCommentUpdate: true,
309- // },
299+ Thanks for the great work!` ,
300+ existingComments : []github.PullRequestComment {
301+ {
302+ Body : github .FormatReviewerComment ("steve" ),
303+ ID : 3333 ,
304+ },
305+ },
306+ expectSpecificReviewers : []string {"rachel" },
307+ expectRemovedReviewers : []string {"steve" },
308+ expectCommentUpdate : true ,
309+ },
310310 }
311311
312312 for tn , tc := range cases {
0 commit comments