|
38 | 38 | from typing import TYPE_CHECKING, Any, NamedTuple |
39 | 39 |
|
40 | 40 | import github.GitCommit |
| 41 | +import github.NamedUser |
41 | 42 | import github.PullRequest |
42 | 43 | import github.WorkflowJob |
43 | 44 | from github.GithubObject import Attribute, CompletableGithubObject, NotSet, Opt, is_optional |
|
46 | 47 | if TYPE_CHECKING: |
47 | 48 | from github.Artifact import Artifact |
48 | 49 | from github.GitCommit import GitCommit |
| 50 | + from github.NamedUser import NamedUser |
49 | 51 | from github.PullRequest import PullRequest |
50 | 52 | from github.Repository import Repository |
51 | 53 | from github.WorkflowJob import WorkflowJob |
@@ -76,6 +78,7 @@ def _initAttributes(self) -> None: |
76 | 78 | self._run_number: Attribute[int] = NotSet |
77 | 79 | self._created_at: Attribute[datetime] = NotSet |
78 | 80 | self._updated_at: Attribute[datetime] = NotSet |
| 81 | + self._actor: Attribute[NamedUser] = NotSet |
79 | 82 | self._pull_requests: Attribute[list[PullRequest]] = NotSet |
80 | 83 | self._status: Attribute[str] = NotSet |
81 | 84 | self._conclusion: Attribute[str] = NotSet |
@@ -187,6 +190,11 @@ def updated_at(self) -> datetime: |
187 | 190 | self._completeIfNotSet(self._updated_at) |
188 | 191 | return self._updated_at.value |
189 | 192 |
|
| 193 | + @property |
| 194 | + def actor(self) -> NamedUser: |
| 195 | + self._completeIfNotSet(self._actor) |
| 196 | + return self._actor.value |
| 197 | + |
190 | 198 | @property |
191 | 199 | def jobs_url(self) -> str: |
192 | 200 | self._completeIfNotSet(self._jobs_url) |
@@ -340,6 +348,8 @@ def _useAttributes(self, attributes: dict[str, Any]) -> None: |
340 | 348 | self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) |
341 | 349 | if "updated_at" in attributes: # pragma no branch |
342 | 350 | self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) |
| 351 | + if "actor" in attributes: # pragma no branch |
| 352 | + self._actor = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["actor"]) |
343 | 353 | if "jobs_url" in attributes: # pragma no branch |
344 | 354 | self._jobs_url = self._makeStringAttribute(attributes["jobs_url"]) |
345 | 355 | if "logs_url" in attributes: # pragma no branch |
|
0 commit comments