This class represents a Sub-issue in GitHub's REST API. Sub-issues are issues that are linked to a parent issue. See https://docs.github.com/en/rest/issues/sub-issues for more details.
| 845 | |
| 846 | |
| 847 | class SubIssue(Issue): |
| 848 | """ |
| 849 | This class represents a Sub-issue in GitHub's REST API. Sub-issues are issues that are linked to a parent issue. |
| 850 | |
| 851 | See https://docs.github.com/en/rest/issues/sub-issues for more details. |
| 852 | |
| 853 | """ |
| 854 | |
| 855 | def _initAttributes(self) -> None: |
| 856 | super()._initAttributes() |
| 857 | # Sub-issue specific attributes |
| 858 | self._parent_issue: Attribute[Issue] = NotSet |
| 859 | self._priority_position: Attribute[int] = NotSet |
| 860 | |
| 861 | def __repr__(self) -> str: |
| 862 | return self.get__repr__({"number": self._number.value, "title": self._title.value}) |
| 863 | |
| 864 | @property |
| 865 | def parent_issue(self) -> Issue: |
| 866 | """ |
| 867 | :type: :class:`github.Issue.Issue` |
| 868 | """ |
| 869 | self._completeIfNotSet(self._parent_issue) |
| 870 | return self._parent_issue.value |
| 871 | |
| 872 | @property |
| 873 | def priority_position(self) -> int: |
| 874 | """ |
| 875 | :type: int |
| 876 | """ |
| 877 | self._completeIfNotSet(self._priority_position) |
| 878 | return self._priority_position.value |
| 879 | |
| 880 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 881 | super()._useAttributes(attributes) |
| 882 | # Process sub-issue specific attributes |
| 883 | if "parent_issue" in attributes: |
| 884 | self._parent_issue = self._makeClassAttribute(Issue, attributes["parent_issue"]) |
| 885 | if "priority_position" in attributes: |
| 886 | self._priority_position = self._makeIntAttribute(attributes["priority_position"]) |
no outgoing calls
no test coverage detected
searching dependent graphs…