mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-26 08:08:55 +02:00
Add Package.get_revision_list() for listing commit log
This commit is contained in:
35
osc/obs_api/package_revision.py
Normal file
35
osc/obs_api/package_revision.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from ..util.models import * # pylint: disable=wildcard-import,unused-wildcard-import
|
||||
|
||||
|
||||
class PackageRevision(XmlModel):
|
||||
XML_TAG = "revision"
|
||||
|
||||
rev: int = Field(
|
||||
xml_attribute=True,
|
||||
)
|
||||
|
||||
vrev: Optional[int] = Field(
|
||||
xml_attribute=True,
|
||||
)
|
||||
|
||||
srcmd5: str = Field(
|
||||
)
|
||||
|
||||
version: str = Field(
|
||||
)
|
||||
|
||||
time: int = Field(
|
||||
)
|
||||
|
||||
user: str = Field(
|
||||
)
|
||||
|
||||
comment: Optional[str] = Field(
|
||||
)
|
||||
|
||||
requestid: Optional[int] = Field(
|
||||
)
|
||||
|
||||
def get_time_str(self):
|
||||
import time
|
||||
return time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(self.time))
|
Reference in New Issue
Block a user