#4151 Fix the pull-request filtering by status in API calls
Closed by lenkaseg. Opened by lenkaseg.
Unknown source master

Download 4151.patch

When filtering with status=Closed, both Closed and Merged pull requests were returned. Now status=Closed returns only closed PRs and status=Merged returns only merged ones.

Added more pull requests to the dev-data.py. (So I could test it on something.)

Fixed the mistake of pr status flag in dev-data.pyand the import in query.py (for some reason it was failing for me)

Shouldn't we have a test that ensures this behavior remains this way?

Otherwise, LGTM. :thumbsup:

It seems the tests already exist in test_pagure_flask_api_user.py

rebased onto c123eb41af8e392746e041b42f5c6ee6afd72901

I added some more data to dev-data.py: more pull requests and assignees of pull requests.

Why this change?

Why this change?

The changes to dev-data.py should be in a different commit, it is not related to fixing the filtering in the API.

I'm also not seeing any new tests, if we're fixing something, we should add a test that fails without the fix and passes with it (does that make sense?)

Why this change?

I was getting an import error, I have no idea why. This fixed it.

The changes to dev-data.py should be in a different commit, it is not related to fixing the filtering in the API.

Ok. I will split it.

I'm also not seeing any new tests, if we're fixing something, we should add a test that fails without the fix and passes with it (does that make sense?)

Ok, I'll try.

i made a new PR for this. Closing this one.

Pull-Request has been closed by lenkaseg

Metadata