(self)
| 258 | return self.raw["commits"]["nodes"][0]["commit"] |
| 259 | |
| 260 | def co_authors(self) -> list[str]: |
| 261 | authors = [] |
| 262 | for commit in self.raw["authorCommits"]["nodes"]: |
| 263 | # Co-authors always come after the main author according to the |
| 264 | # GitHub docs, so ignore the first item |
| 265 | for author in commit["commit"]["authors"]["nodes"][1:]: |
| 266 | name = author["name"] |
| 267 | email = author["email"] |
| 268 | authors.append(f"{name} <{email}>") |
| 269 | |
| 270 | return list(set(authors)) |
| 271 | |
| 272 | def head_oid(self): |
| 273 | return self.head_commit()["oid"] |
no test coverage detected