| 167 | return unreleased_versions |
| 168 | |
| 169 | def resolve(self, fix_version, comment, pr_body): |
| 170 | cur_status = self.issue["state"] |
| 171 | |
| 172 | if cur_status == "closed": |
| 173 | self.cmd.fail("GitHub issue %s already has status '%s'" |
| 174 | % (self.github_id, cur_status)) |
| 175 | |
| 176 | if DEBUG: |
| 177 | print("GitHub issue %s untouched -> %s" % |
| 178 | (self.github_id, fix_version)) |
| 179 | else: |
| 180 | self.github_api.assign_milestone(self.github_id, fix_version) |
| 181 | if f"Closes: #{self.github_id}" not in pr_body: |
| 182 | self.github_api.close_issue(self.github_id, comment) |
| 183 | print("Successfully resolved %s!" % (self.github_id)) |
| 184 | |
| 185 | self.issue = self.github_api.get_issue_data(self.github_id) |
| 186 | self.show() |
| 187 | |
| 188 | def show(self): |
| 189 | issue = self.issue |