Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging extension (closes #151) #154

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ Extensions
.. automodule:: osctiny.extensions.search
:members:

.. automodule:: osctiny.extensions.staging
:members:

Models
------

.. automodule:: osctiny.models
:members:
:undoc-members:

.. automodule:: osctiny.models.staging
:members:
:undoc-members:

Utilities
---------

Expand Down
9 changes: 5 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath('.'))))
from osctiny import __version__


# -- Project information -----------------------------------------------------

project = 'OSC Tiny'
copyright = '2022, Andreas Hasenkopf'
author = 'Andreas Hasenkopf'
copyright = '2024, SUSE'
author = 'SUSE MAE Team'

# The short X.Y version
version = '0.6.2'
version = __version__
# The full version, including alpha/beta/rc tags
release = '0.6.2'
release = __version__


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ from GitHub using ``pip``:

.. code-block:: bash

pip install git+https://github.com/crazyscientist/osc-tiny.git
pip install git+https://github.com/SUSE/osc-tiny.git

Strong authentication
^^^^^^^^^^^^^^^^^^^^^
Expand Down
22 changes: 22 additions & 0 deletions osctiny/extensions/buildresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,28 @@ def get_package_list(self, project, repo, arch):

return self.osc.get_objectified_xml(response)

def get_status_and_build_id(self, project, repo, arch):
"""
Get build status and build ID

:param project: Project name
:param repo: Repository name
:param arch: Architecture name
:return: Objectified XML element
:rtype: lxml.objectify.ObjectifiedElement

.. versionadded:: {{ NEXT_RELEASE }}
"""
response = self.osc.request(
method="GET",
url=urljoin(self.osc.url, "{}/{}/{}/{}".format(
self.base_path, project, repo, arch
)),
params={"view": "status"}
)

return self.osc.get_objectified_xml(response)

def get_binary_list(self, project, repo, arch, package, **params):
"""
Get a list of built RPMs
Expand Down
2 changes: 1 addition & 1 deletion osctiny/extensions/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_list(self, deleted=False):
def get_meta(self, project, rev=None):
"""
Get project metadata

.. versionchanged:: 0.8.0
Added the ``rev`` parameter

Expand Down
Loading
Loading