File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ def handle_comment(self, comment: Dict):
60
60
commands = self .parse_commands_from_text (comment ["comment" ]["body" ])
61
61
62
62
# Retrieve the issue this comment is attached to
63
- self .proposal = self .repo .get_issue (comment ["issue" ]["number" ])
64
- self .proposal_labels_str = [label ["name" ] for label in comment ["issue" ]["labels" ]]
63
+ # Account for issue and pull request review comments
64
+ issue = comment ["issue" ] if "issue" in comment else comment ["pull_request" ]
65
+ self .proposal = self .repo .get_issue (issue ["number" ])
66
+ self .proposal_labels_str = [label ["name" ] for label in issue ["labels" ]]
65
67
original_labels = self .proposal_labels_str .copy ()
66
68
67
69
self .comment = comment
Original file line number Diff line number Diff line change @@ -76,8 +76,11 @@ def _process_comment(self, comment: Dict):
76
76
log .debug ("Ignoring comment from ourselves" )
77
77
return
78
78
79
- # Is this a proposal?
80
- if not self ._issue_has_label (comment ["issue" ], self .config .github_proposal_label ):
79
+ # Account for issue and pull request review comments
80
+ issue = comment ["issue" ] if "issue" in comment else comment ["pull_request" ]
81
+
82
+ # Check if this is a proposal
83
+ if not self ._issue_has_label (issue , self .config .github_proposal_label ):
81
84
log .debug ("Ignoring comment without appropriate proposal label" )
82
85
return
83
86
You can’t perform that action at this time.
0 commit comments