We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The schema definition for the <review> node in a request requires a mandatory state attribute, but the corresponding model in osctiny doesn't have that attribute.
<review>
The text was updated successfully, but these errors were encountered:
Seriously? The client has to specify a state attribute just so that the server can ignore it?
state
Assuming I extend the Review model to submit a specified state:
Review
from lxml.etree import tounicode from osctiny import Osc from osctiny.models.request import Action, ActionType, By, Source, Target, Review from requests.exceptions import HTTPError o = Osc("https://api.opensuse.org", "apritschet", "******") action = Action(type=ActionType.SUBMIT, source=Source(project="home:apritschet", package="plantuml"), target=Target(project="home:apritschet", package="plantuml.bak")) review = Review(by=By.USER, name="apritschet", state="declined") print("REVIEW", tounicode(review.asxml())) try: request_id = o.requests.create( actions=[action], reviewers=[review], description="Test review model" ) except HTTPError as error: print("ERROR", error.response.content) else: print("Request ID:", request_id)
results in
REVIEW <review by_user="apritschet" state="declined"/> Request ID: 1208298
osc -A https://api.opensuse.org api /request/1208298
<request id="1208298" creator="apritschet"> <action type="submit"> <source project="home:apritschet" package="plantuml" rev="e4f2f428e501bddc4c1a639638117dbb"/> <target project="home:apritschet" package="plantuml.bak"/> </action> <state name="review" who="apritschet" when="2024-10-16T07:41:06" created="2024-10-16T07:41:06"> <comment/> </state> <review state="new" when="2024-10-16T07:41:06" by_user="apritschet"/> <description>Test review model</description> </request>
So, I requested to create a request with a review in a specific state, but OBS ignores the value; it only insists on the presence of the attribute.
IMHO, the behavior of the OBS API is wrong. Would you like to report an issue for OBS?
Sorry, something went wrong.
No branches or pull requests
The schema definition for the
<review>
node in a request requires a mandatory state attribute, but the corresponding model in osctiny doesn't have that attribute.The text was updated successfully, but these errors were encountered: