| |
@@ -21,7 +21,7 @@
|
| |
import pagure.exceptions
|
| |
import pagure.lib.query
|
| |
from pagure.api import API, api_method, APIERROR, get_page, get_per_page
|
| |
- from pagure.utils import is_true
|
| |
+ from pagure.utils import is_true, validate_date, validate_date_range
|
| |
|
| |
|
| |
def _get_user(username):
|
| |
@@ -201,67 +201,98 @@
|
| |
Parameters
|
| |
^^^^^^^^^^
|
| |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | Key | Type | Optionality | Description |
|
| |
- +===============+=========+==============+===========================+
|
| |
- | ``page`` | integer | Mandatory | | The page requested. |
|
| |
- | | | | Defaults to 1. |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``per_page`` | int | Optional | | The number of items |
|
| |
- | | | | to return per page. |
|
| |
- | | | | The maximum is 100. |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``status`` | string | Optional | | Filters the status of |
|
| |
- | | | | issues. Fetches all the |
|
| |
- | | | | issues if status is |
|
| |
- | | | | ``all``. Default: |
|
| |
- | | | | ``Open`` |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``tags`` | string | Optional | | A list of tags you |
|
| |
- | | | | wish to filter. If |
|
| |
- | | | | you want to filter |
|
| |
- | | | | for issues not having |
|
| |
- | | | | a tag, add an |
|
| |
- | | | | exclamation mark in |
|
| |
- | | | | front of it |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``milestones``| list of | Optional | | Filter the issues |
|
| |
- | | strings | | by milestone |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``no_stones`` | boolean | Optional | | If true returns only the|
|
| |
- | | | | issues having no |
|
| |
- | | | | milestone, if false |
|
| |
- | | | | returns only the issues |
|
| |
- | | | | having a milestone |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``since`` | string | Optional | | Filter the issues |
|
| |
- | | | | updated after this date.|
|
| |
- | | | | The date can either be |
|
| |
- | | | | provided as an unix date|
|
| |
- | | | | or in the format Y-M-D |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``order`` | string | Optional | | Set the ordering of the |
|
| |
- | | | | issues. This can be |
|
| |
- | | | | ``asc`` or ``desc``. |
|
| |
- | | | | Default: ``desc`` |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``order_key`` | string | Optional | | Set the ordering key. |
|
| |
- | | | | This can be ``assignee``|
|
| |
- | | | | , ``last_updated`` or |
|
| |
- | | | | name of other column. |
|
| |
- | | | | Default: |
|
| |
- | | | | ``date_created`` |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``assignee`` | boolean | Optional | | A boolean of whether to |
|
| |
- | | | | return the issues |
|
| |
- | | | | assigned to this user |
|
| |
- | | | | or not. Defaults to True|
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
- | ``author`` | boolean | Optional | | A boolean of whether to |
|
| |
- | | | | return the issues |
|
| |
- | | | | created by this user or |
|
| |
- | | | | not. Defaults to True |
|
| |
- +---------------+---------+--------------+---------------------------+
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | Key | Type | Optionality | Description |
|
| |
+ +===============+=========+==============+=============================+
|
| |
+ | ``page`` | integer | Mandatory | | The page requested. |
|
| |
+ | | | | Defaults to 1. |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``per_page`` | int | Optional | | The number of items |
|
| |
+ | | | | to return per page. |
|
| |
+ | | | | The maximum is 100. |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``status`` | string | Optional | | Filters the status of |
|
| |
+ | | | | issues. Fetches all the |
|
| |
+ | | | | issues if status is |
|
| |
+ | | | | ``all``. Default: |
|
| |
+ | | | | ``Open`` |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``tags`` | string | Optional | | A list of tags you wish to|
|
| |
+ | | | | filter. If you want to |
|
| |
+ | | | | filter for issues not |
|
| |
+ | | | | having a tag, add an |
|
| |
+ | | | | exclamation mark in front |
|
| |
+ | | | | of it |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``milestones``| list of | Optional | | Filter the issues by |
|
| |
+ | | strings | | milestone |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``no_stones`` | boolean | Optional | | If true returns only the |
|
| |
+ | | | | issues having no |
|
| |
+ | | | | milestone, if false |
|
| |
+ | | | | returns only the issues |
|
| |
+ | | | | having a milestone |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``since`` | string | Optional | | Filter the issues |
|
| |
+ | | | | updated after this date. |
|
| |
+ | | | | The date can either be |
|
| |
+ | | | | provided as an unix date |
|
| |
+ | | | | or in the format Y-M-D |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``order`` | string | Optional | | Set the ordering of the |
|
| |
+ | | | | issues. This can be |
|
| |
+ | | | | ``asc`` or ``desc``. |
|
| |
+ | | | | Default: ``desc`` |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``order_key`` | string | Optional | | Set the ordering key. |
|
| |
+ | | | | This can be ``assignee`` |
|
| |
+ | | | | , ``last_updated`` or |
|
| |
+ | | | | name of other column. |
|
| |
+ | | | | Default: ``date_created`` |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``assignee`` | boolean | Optional | | A boolean of whether to |
|
| |
+ | | | | return the issues |
|
| |
+ | | | | assigned to this user |
|
| |
+ | | | | or not. Defaults to True |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``author`` | boolean | Optional | | A boolean of whether to |
|
| |
+ | | | | return the issues |
|
| |
+ | | | | created by this user or |
|
| |
+ | | | | not. Defaults to True |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``created`` | string | Optional | | Filter the issues returned|
|
| |
+ | | | | by their creation date |
|
| |
+ | | | | The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``updated`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their update |
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
+ | ``closed`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their closing |
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+---------+--------------+-----------------------------+
|
| |
|
| |
Sample response
|
| |
^^^^^^^^^^^^^^^
|
| |
@@ -279,7 +310,10 @@
|
| |
"page": 1,
|
| |
"since": null,
|
| |
"status": null,
|
| |
- "tags": []
|
| |
+ "tags": [],
|
| |
+ "created": null,
|
| |
+ "updated": null,
|
| |
+ "closed": null,
|
| |
},
|
| |
"issues_assigned": [
|
| |
{
|
| |
@@ -373,6 +407,18 @@
|
| |
status = flask.request.args.get("status", None)
|
| |
tags = flask.request.args.getlist("tags")
|
| |
tags = [tag.strip() for tag in tags if tag.strip()]
|
| |
+ created = flask.request.args.get("created")
|
| |
+ updated = flask.request.args.get("updated")
|
| |
+ closed = flask.request.args.get("closed")
|
| |
+
|
| |
+ try:
|
| |
+ created_since, created_until = validate_date_range(created)
|
| |
+ updated_since, updated_until = validate_date_range(updated)
|
| |
+ closed_since, closed_until = validate_date_range(closed)
|
| |
+ except pagure.exceptions.InvalidTimestampException:
|
| |
+ raise pagure.exceptions.APIError(400, error_code=APIERROR.ETIMESTAMP)
|
| |
+ except pagure.exceptions.InvalidDateformatException:
|
| |
+ raise pagure.exceptions.APIError(400, error_code=APIERROR.EDATETIME)
|
| |
|
| |
page = get_page()
|
| |
per_page = get_per_page()
|
| |
@@ -400,6 +446,12 @@
|
| |
"no_milestones": no_stones,
|
| |
"offset": offset,
|
| |
"limit": limit,
|
| |
+ "created_since": created_since,
|
| |
+ "created_until": created_until,
|
| |
+ "updated_since": updated_since,
|
| |
+ "updated_until": updated_until,
|
| |
+ "closed_since": closed_since,
|
| |
+ "closed_until": closed_until,
|
| |
}
|
| |
|
| |
if status is not None:
|
| |
@@ -414,23 +466,7 @@
|
| |
|
| |
updated_after = None
|
| |
if since:
|
| |
- # Validate and convert the time
|
| |
- if since.isdigit():
|
| |
- # We assume its a timestamp, so convert it to datetime
|
| |
- try:
|
| |
- updated_after = datetime.datetime.fromtimestamp(int(since))
|
| |
- except ValueError:
|
| |
- raise pagure.exceptions.APIError(
|
| |
- 400, error_code=APIERROR.ETIMESTAMP
|
| |
- )
|
| |
- else:
|
| |
- # We assume datetime format, so validate it
|
| |
- try:
|
| |
- updated_after = datetime.datetime.strptime(since, "%Y-%m-%d")
|
| |
- except ValueError:
|
| |
- raise pagure.exceptions.APIError(
|
| |
- 400, error_code=APIERROR.EDATETIME
|
| |
- )
|
| |
+ updated_after = validate_date(since)
|
| |
|
| |
params.update({"updated_after": updated_after})
|
| |
|
| |
@@ -491,6 +527,9 @@
|
| |
"page": page,
|
| |
"assignee": assignee,
|
| |
"author": author,
|
| |
+ "created": created,
|
| |
+ "updated": updated,
|
| |
+ "closed": closed,
|
| |
},
|
| |
}
|
| |
)
|
| |
@@ -755,32 +794,65 @@
|
| |
Parameters
|
| |
^^^^^^^^^^
|
| |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | Key | Type | Optionality | Description |
|
| |
- +===============+==========+==============+============================+
|
| |
- | ``username`` | string | Mandatory | | The username of the user |
|
| |
- | | | | whose activity you are |
|
| |
- | | | | interested in. |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | ``status`` | string | Optional | | Filter the status of |
|
| |
- | | | | pull requests. Default: |
|
| |
- | | | | ``Open`` (open pull |
|
| |
- | | | | requests), can be |
|
| |
- | | | | ``Closed`` for closed |
|
| |
- | | | | requests, ``Merged`` |
|
| |
- | | | | for merged requests, or |
|
| |
- | | | | ``Open`` for open |
|
| |
- | | | | requests. |
|
| |
- | | | | ``All`` returns closed, |
|
| |
- | | | | merged and open requests.|
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | ``page`` | integer | Mandatory | | The page requested. |
|
| |
- | | | | Defaults to 1. |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | ``per_page`` | int | Optional | | The number of items to |
|
| |
- | | | | return per page. |
|
| |
- | | | | The maximum is 100. |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | Key | Type | Optionality | Description |
|
| |
+ +===============+==========+==============+=============================+
|
| |
+ | ``username`` | string | Mandatory | | The username of the user |
|
| |
+ | | | | whose activity you are |
|
| |
+ | | | | interested in. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``status`` | string | Optional | | Filter the status of |
|
| |
+ | | | | pull requests. Default: |
|
| |
+ | | | | ``Open`` (open pull |
|
| |
+ | | | | requests), can be |
|
| |
+ | | | | ``Closed`` for closed |
|
| |
+ | | | | requests, ``Merged`` |
|
| |
+ | | | | for merged requests, or |
|
| |
+ | | | | ``Open`` for open |
|
| |
+ | | | | requests. |
|
| |
+ | | | | ``All`` returns closed, |
|
| |
+ | | | | merged and open requests. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``created`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their creation|
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``updated`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their update |
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``closed`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their closing |
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``page`` | integer | Mandatory | | The page requested. |
|
| |
+ | | | | Defaults to 1. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``per_page`` | int | Optional | | The number of items to |
|
| |
+ | | | | return per page. |
|
| |
+ | | | | The maximum is 100. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
|
| |
|
| |
Sample response
|
| |
@@ -793,6 +865,9 @@
|
| |
"status": "open",
|
| |
"username": "dudemcpants",
|
| |
"page": 1,
|
| |
+ "created": null,
|
| |
+ "updated": null,
|
| |
+ "closed": null,
|
| |
},
|
| |
"pagination": {
|
| |
"first": "http://localhost:5000/api/0/user/dudemcpants/requests/filed?per_page=1&page=1",
|
| |
@@ -931,6 +1006,18 @@
|
| |
|
| |
""" # noqa
|
| |
status = flask.request.args.get("status", "open")
|
| |
+ created = flask.request.args.get("created")
|
| |
+ updated = flask.request.args.get("updated")
|
| |
+ closed = flask.request.args.get("closed")
|
| |
+
|
| |
+ try:
|
| |
+ created_since, created_until = validate_date_range(created)
|
| |
+ updated_since, updated_until = validate_date_range(updated)
|
| |
+ closed_since, closed_until = validate_date_range(closed)
|
| |
+ except pagure.exceptions.InvalidTimestampException:
|
| |
+ raise pagure.exceptions.APIError(400, error_code=APIERROR.ETIMESTAMP)
|
| |
+ except pagure.exceptions.InvalidDateformatException:
|
| |
+ raise pagure.exceptions.APIError(400, error_code=APIERROR.EDATETIME)
|
| |
|
| |
page = get_page()
|
| |
per_page = get_per_page()
|
| |
@@ -948,6 +1035,12 @@
|
| |
username=username,
|
| |
status=status,
|
| |
filed=username,
|
| |
+ created_since=created_since,
|
| |
+ created_until=created_until,
|
| |
+ updated_since=updated_since,
|
| |
+ updated_until=updated_until,
|
| |
+ closed_since=closed_since,
|
| |
+ closed_until=closed_until,
|
| |
count=True,
|
| |
)
|
| |
pagination = pagure.lib.query.get_pagination_metadata(
|
| |
@@ -959,6 +1052,12 @@
|
| |
username=username,
|
| |
status=status,
|
| |
filed=username,
|
| |
+ created_since=created_since,
|
| |
+ created_until=created_until,
|
| |
+ updated_since=updated_since,
|
| |
+ updated_until=updated_until,
|
| |
+ closed_since=closed_since,
|
| |
+ closed_until=closed_until,
|
| |
offset=offset,
|
| |
limit=limit,
|
| |
)
|
| |
@@ -975,6 +1074,9 @@
|
| |
"username": username,
|
| |
"status": orig_status,
|
| |
"page": page,
|
| |
+ "created": created,
|
| |
+ "updated": updated,
|
| |
+ "closed": closed,
|
| |
},
|
| |
"pagination": pagination,
|
| |
}
|
| |
@@ -1002,28 +1104,61 @@
|
| |
Parameters
|
| |
^^^^^^^^^^
|
| |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | Key | Type | Optionality | Description |
|
| |
- +===============+==========+==============+============================+
|
| |
- | ``username`` | string | Mandatory | | The username of the user |
|
| |
- | | | | whose activity you are |
|
| |
- | | | | interested in. |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | ``page`` | integer | Mandatory | | The page requested. |
|
| |
- | | | | Defaults to 1. |
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
- | ``status`` | string | Optional | | Filter the status of |
|
| |
- | | | | pull requests. Default: |
|
| |
- | | | | ``Open`` (open pull |
|
| |
- | | | | requests), can be |
|
| |
- | | | | ``Closed`` for closed |
|
| |
- | | | | requests, ``Merged`` |
|
| |
- | | | | for merged requests, or |
|
| |
- | | | | ``Open`` for open |
|
| |
- | | | | requests. |
|
| |
- | | | | ``All`` returns closed, |
|
| |
- | | | | merged and open requests.|
|
| |
- +---------------+----------+--------------+----------------------------+
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | Key | Type | Optionality | Description |
|
| |
+ +===============+==========+==============+=============================+
|
| |
+ | ``username`` | string | Mandatory | | The username of the user |
|
| |
+ | | | | whose activity you are |
|
| |
+ | | | | interested in. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``created`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their creation|
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``updated`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their update |
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``closed`` | string | Optional | | Filter the pull-requests |
|
| |
+ | | | | returned by their closing |
|
| |
+ | | | | date. The date can be of |
|
| |
+ | | | | specified either using |
|
| |
+ | | | | a timestamp format or |
|
| |
+ | | | | using the iso format for |
|
| |
+ | | | | dates: yyyy-mm-dd. |
|
| |
+ | | | | You can specify a start |
|
| |
+ | | | | and a end date to this |
|
| |
+ | | | | filter using start..end. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``page`` | integer | Mandatory | | The page requested. |
|
| |
+ | | | | Defaults to 1. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
+ | ``status`` | string | Optional | | Filter the status of |
|
| |
+ | | | | pull requests. Default: |
|
| |
+ | | | | ``Open`` (open pull |
|
| |
+ | | | | requests), can be |
|
| |
+ | | | | ``Closed`` for closed |
|
| |
+ | | | | requests, ``Merged`` |
|
| |
+ | | | | for merged requests, or |
|
| |
+ | | | | ``Open`` for open |
|
| |
+ | | | | requests. |
|
| |
+ | | | | ``All`` returns closed, |
|
| |
+ | | | | merged and open requests. |
|
| |
+ +---------------+----------+--------------+-----------------------------+
|
| |
|
| |
Sample response
|
| |
^^^^^^^^^^^^^^^
|
| |
@@ -1035,6 +1170,9 @@
|
| |
"status": "open",
|
| |
"username": "ryanlerch",
|
| |
"page": 1,
|
| |
+ "created": null,
|
| |
+ "updated": null,
|
| |
+ "closed": null,
|
| |
},
|
| |
"pagination": {
|
| |
"first": "http://localhost:5000/api/0/user/ryanlerch/requests/actionable?per_page=1&page=1",
|
| |
@@ -1173,6 +1311,18 @@
|
| |
|
| |
""" # noqa
|
| |
status = flask.request.args.get("status", "open")
|
| |
+ created = flask.request.args.get("created")
|
| |
+ updated = flask.request.args.get("updated")
|
| |
+ closed = flask.request.args.get("closed")
|
| |
+
|
| |
+ try:
|
| |
+ created_since, created_until = validate_date_range(created)
|
| |
+ updated_since, updated_until = validate_date_range(updated)
|
| |
+ closed_since, closed_until = validate_date_range(closed)
|
| |
+ except pagure.exceptions.InvalidTimestampException:
|
| |
+ raise pagure.exceptions.APIError(400, error_code=APIERROR.ETIMESTAMP)
|
| |
+ except pagure.exceptions.InvalidDateformatException:
|
| |
+ raise pagure.exceptions.APIError(400, error_code=APIERROR.EDATETIME)
|
| |
|
| |
page = get_page()
|
| |
per_page = get_per_page()
|
| |
@@ -1190,6 +1340,12 @@
|
| |
username=username,
|
| |
status=status,
|
| |
actionable=username,
|
| |
+ created_since=created_since,
|
| |
+ created_until=created_until,
|
| |
+ updated_since=updated_since,
|
| |
+ updated_until=updated_until,
|
| |
+ closed_since=closed_since,
|
| |
+ closed_until=closed_until,
|
| |
count=True,
|
| |
)
|
| |
pagination = pagure.lib.query.get_pagination_metadata(
|
| |
@@ -1201,6 +1357,12 @@
|
| |
username=username,
|
| |
status=status,
|
| |
actionable=username,
|
| |
+ created_since=created_since,
|
| |
+ created_until=created_until,
|
| |
+ updated_since=updated_since,
|
| |
+ updated_until=updated_until,
|
| |
+ closed_since=closed_since,
|
| |
+ closed_until=closed_until,
|
| |
offset=offset,
|
| |
limit=limit,
|
| |
)
|
| |
@@ -1217,6 +1379,9 @@
|
| |
"username": username,
|
| |
"status": orig_status,
|
| |
"page": page,
|
| |
+ "created": created,
|
| |
+ "updated": updated,
|
| |
+ "closed": closed,
|
| |
},
|
| |
"pagination": pagination,
|
| |
}
|
| |