Module ogr.services.github.label
Expand source code
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
from typing import Union
from github.Label import Label as _GithubLabel
from ogr.abstract import Issue, IssueLabel, Label, PRLabel, PullRequest
class GithubLabel(Label):
def __init__(
self,
raw_label: _GithubLabel,
parent: Union[PullRequest, Issue],
) -> None:
super().__init__(parent)
self._raw_label = raw_label
def __str__(self) -> str:
return f'GithubLabel(name="{self.name}")'
@property
def name(self):
return self._raw_label.name
class GithubPRLabel(GithubLabel, PRLabel):
pass
class GithubIssueLabel(GithubLabel, IssueLabel):
pass
Classes
class GithubIssueLabel (raw_label: github.Label.Label, parent: Union[PullRequest, Issue])
-
Represents labels on PRs and issues.
Expand source code
class GithubIssueLabel(GithubLabel, IssueLabel): pass
Ancestors
Inherited members
class GithubLabel (raw_label: github.Label.Label, parent: Union[PullRequest, Issue])
-
Represents labels on PRs and issues.
Expand source code
class GithubLabel(Label): def __init__( self, raw_label: _GithubLabel, parent: Union[PullRequest, Issue], ) -> None: super().__init__(parent) self._raw_label = raw_label def __str__(self) -> str: return f'GithubLabel(name="{self.name}")' @property def name(self): return self._raw_label.name
Ancestors
Subclasses
Inherited members
class GithubPRLabel (raw_label: github.Label.Label, parent: Union[PullRequest, Issue])
-
Represents labels on PRs and issues.
Expand source code
class GithubPRLabel(GithubLabel, PRLabel): pass
Ancestors
Inherited members