Add actor property to WorkflowRun#2764
Conversation
| if "updated_at" in attributes: # pragma no branch | ||
| self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) | ||
| if "actor" in attributes: # pragma no branch | ||
| self._actor = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["actor"]) |
There was a problem hiding this comment.
Need to import this class I guess
There was a problem hiding this comment.
Yeah wasn't too sure what is needed here. I saw later on github.Repository.Repository also was referenced but only imported by name with TYPE_CHECKING.
Would adding import github.NamedUser be the right move?
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2764 +/- ##
==========================================
- Coverage 96.74% 96.72% -0.02%
==========================================
Files 139 139
Lines 14184 14193 +9
==========================================
+ Hits 13722 13728 +6
- Misses 462 465 +3 ☔ View full report in Codecov by Sentry. |
|
lgtm |
EnricoMi
left a comment
There was a problem hiding this comment.
Can we add this new attribute to https://github.com/PyGithub/PyGithub/blob/main/tests/WorkflowRun.py#L40? LGTM besides this.
The GitHub API returns an
actorfield when listing workflow runs butWorkflowRundoes not includeactor.This PR adds the
actorproperty ofNamedUsertype.Not sure about field ordering conventions so just followed the API response schema.