diff --git a/pagure/api/__init__.py b/pagure/api/__init__.py index 2403f12..89a1958 100644 --- a/pagure/api/__init__.py +++ b/pagure/api/__init__.py @@ -214,11 +214,12 @@ def api_users(): Parameters ^^^^^^^^^^ - +---------------+----------+---------------+-------------------------------------------------+ - | Key | Type | Optionality | Description | - +===============+==========+===============+=================================================+ - | ``pattern`` | string | Optional | Filters the starting letters of the usernames | - +---------------+----------+---------------+-------------------------------------------------+ + +---------------+----------+---------------+------------------------------+ + | Key | Type | Optionality | Description | + +===============+==========+===============+==============================+ + | ``pattern`` | string | Optional | | Filters the starting | + | | | | letters of the usernames | + +---------------+----------+---------------+------------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -266,11 +267,12 @@ def api_project_tags(repo, username=None): Parameters ^^^^^^^^^^ - +---------------+----------+---------------+--------------------------------------------+ - | Key | Type | Optionality | Description | - +===============+==========+===============+============================================+ - | ``pattern`` | string | Optional | Filters the starting letters of the tags | - +---------------+----------+---------------+--------------------------------------------+ + +---------------+----------+---------------+--------------------------+ + | Key | Type | Optionality | Description | + +===============+==========+===============+==========================+ + | ``pattern`` | string | Optional | | Filters the starting | + | | | | letters of the tags | + +---------------+----------+---------------+--------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -320,11 +322,13 @@ def api_groups(): Parameters ^^^^^^^^^^ - +---------------+----------+---------------+---------------------------------------------------+ - | Key | Type | Optionality | Description | - +===============+==========+===============+===================================================+ - | ``pattern`` | string | Optional | Filters the starting letters of the group names | - +---------------+----------+---------------+---------------------------------------------------+ + +---------------+----------+---------------+--------------------------+ + | Key | Type | Optionality | Description | + +===============+==========+===============+==========================+ + | ``pattern`` | string | Optional | | Filters the starting | + | | | | letters of the group | + | | | | names | + +---------------+----------+---------------+--------------------------+ Sample response ^^^^^^^^^^^^^^^ diff --git a/pagure/api/fork.py b/pagure/api/fork.py index b03667e..9a0adba 100644 --- a/pagure/api/fork.py +++ b/pagure/api/fork.py @@ -39,15 +39,20 @@ def api_pull_request_views(repo, username=None): Parameters ^^^^^^^^^^ - +----------------+-----------+---------------+--------------------------------------------------------------------------------+ - | Key | Type | Optionality | Description | - +================+===========+===============+================================================================================+ - | ``status`` | boolean | Optional | Filter the status of pull requests. Default: ``True`` (opened pull requests) | - +----------------+-----------+---------------+--------------------------------------------------------------------------------+ - | ``assignee`` | string | Optional | Filter the assignee of pull requests | - +----------------+-----------+---------------+--------------------------------------------------------------------------------+ - | ``author`` | string | Optional | Filter the author of pull requests | - +----------------+-----------+---------------+--------------------------------------------------------------------------------+ + +----------------+-----------+---------------+-----------------------------+ + | Key | Type | Optionality | Description | + +================+===========+===============+=============================+ + | ``status`` | boolean | Optional | | Filter the status of | + | | | | pull requests. Default: | + | | | | ``True`` (opened pull | + | | | | requests) | + +----------------+-----------+---------------+-----------------------------+ + | ``assignee`` | string | Optional | | Filter the assignee of | + | | | | pull requests | + +----------------+-----------+---------------+-----------------------------+ + | ``author`` | string | Optional | | Filter the author of | + | | | | pull requests | + +----------------+-----------+---------------+-----------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -399,17 +404,25 @@ def api_pull_request_add_comment(repo, requestid, username=None): Input ^^^^^ - +----------------+----------+---------------+----------------------------------------------------------------------------+ - | Key | Type | Optionality | Description | - +================+==========+===============+============================================================================+ - | ``comment`` | string | Mandatory | The comment to add to the pull request | - +----------------+----------+---------------+----------------------------------------------------------------------------+ - | ``commit`` | string | Optional | The hash of the specific commit you wish to comment on | - +----------------+----------+---------------+----------------------------------------------------------------------------+ - | ``filename`` | string | Optional | The filename of the specific file you wish to comment on | - +----------------+----------+---------------+----------------------------------------------------------------------------+ - | ``row`` | int | Optional | Used in combination with filename to comment on a specific row of a file | - +----------------+----------+---------------+----------------------------------------------------------------------------+ + +----------------+----------+---------------+------------------------------+ + | Key | Type | Optionality | Description | + +================+==========+===============+==============================+ + | ``comment`` | string | Mandatory | | The comment to add | + | | | | to the pull request | + +----------------+----------+---------------+------------------------------+ + | ``commit`` | string | Optional | | The hash of the specific | + | | | | commit you wish to | + | | | | comment on | + +----------------+----------+---------------+------------------------------+ + | ``filename`` | string | Optional | | The filename of the | + | | | | specific file you wish | + | | | | to comment on | + +----------------+----------+---------------+------------------------------+ + | ``row`` | int | Optional | | Used in combination | + | | | | with filename to comment | + | | | | on a specific row | + | | | | of a file | + +----------------+----------+---------------+------------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -498,21 +511,44 @@ def api_pull_request_add_flag(repo, requestid, username=None): Input ^^^^^ - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Key | Type | Optionality | Description | - +================+==========+===============+==========================================================================================================================================================================================================================================================+ - | ``username`` | string | Mandatory | The name of the application to be presented to users on the pull request page | - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``percent`` | int | Mandatory | A percentage of completion compared to the goal. The percentage also determine the background color of the flag on the pull-request page | - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``comment`` | string | Mandatory | A short message summarizing the presented results | - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``url`` | string | Mandatory | A URL to the result of this flag | - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``uid`` | string | Optional | A unique identifier used to identify a flag on a pull-request. If the provided UID matches an existing one, then the API call will update the existing one rather than create a new one. Maximum Length: 32 characters. Default: an auto generated UID | - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ``commit`` | string | Optional | The hash of the commit you use | - +----------------+----------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------+----------+---------------+------------------------------+ + | Key | Type | Optionality | Description | + +================+==========+===============+==============================+ + | ``username`` | string | Mandatory | | The name of the | + | | | | application to be | + | | | | presented to users | + | | | | on the pull request page | + +----------------+----------+---------------+------------------------------+ + | ``percent`` | int | Mandatory | | A percentage of | + | | | | completion compared to | + | | | | the goal. The percentage | + | | | | also determine the | + | | | | background color of the | + | | | | flag on the pull-request | + | | | | page | + +----------------+----------+---------------+------------------------------+ + | ``comment`` | string | Mandatory | | A short message | + | | | | summarizing the | + | | | | presented results | + +----------------+----------+---------------+------------------------------+ + | ``url`` | string | Mandatory | | A URL to the result | + | | | | of this flag | + +----------------+----------+---------------+------------------------------+ + | ``uid`` | string | Optional | | A unique identifier used | + | | | | to identify a flag on a | + | | | | pull-request. If the | + | | | | provided UID matches an | + | | | | existing one, then the | + | | | | API call will update the | + | | | | existing one rather than | + | | | | create a new one. | + | | | | Maximum Length: 32 | + | | | | characters. Default: an | + | | | | auto generated UID | + +----------------+----------+---------------+------------------------------+ + | ``commit`` | string | Optional | | The hash of the commit | + | | | | you use | + +----------------+----------+---------------+------------------------------+ Sample response ^^^^^^^^^^^^^^^ diff --git a/pagure/api/issue.py b/pagure/api/issue.py index 748a269..2ac5ddd 100644 --- a/pagure/api/issue.py +++ b/pagure/api/issue.py @@ -42,15 +42,18 @@ def api_new_issue(repo, username=None): Input ^^^^^ - +---------------+-----------+---------------+--------------------------------------------------------------+ - | Key | Type | Optionality | Description | - +===============+===========+===============+==============================================================+ - | ``title`` | string | Mandatory | The title of the issue | - +---------------+-----------+---------------+--------------------------------------------------------------+ - | ``content`` | string | Mandatory | The description of the issue | - +---------------+-----------+---------------+--------------------------------------------------------------+ - | ``private`` | boolean | Optional | Include this key if you want a private issue to be created | - +---------------+-----------+---------------+--------------------------------------------------------------+ + +---------------+-----------+---------------+------------------------------+ + | Key | Type | Optionality | Description | + +===============+===========+===============+==============================+ + | ``title`` | string | Mandatory | The title of the issue | + +---------------+-----------+---------------+------------------------------+ + | ``content`` | string | Mandatory | | The description of the | + | | | | issue | + +---------------+-----------+---------------+------------------------------+ + | ``private`` | boolean | Optional | | Include this key if | + | | | | you want a private issue | + | | | | to be created | + +---------------+-----------+---------------+------------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -153,17 +156,27 @@ def api_view_issues(repo, username=None): Parameters ^^^^^^^^^^ - +----------------+----------+---------------+--------------------------------------------------------------------------------------------------------------------------------+ - | Key | Type | Optionality | Description | - +================+==========+===============+================================================================================================================================+ - | ``status`` | string | Optional | Filters the status of issues. 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 | - +----------------+----------+---------------+--------------------------------------------------------------------------------------------------------------------------------+ - | ``assignee`` | string | Optional | Filter the issues by assignee | - +----------------+----------+---------------+--------------------------------------------------------------------------------------------------------------------------------+ - | ``author`` | string | Optional | Filter the issues by creator | - +----------------+----------+---------------+--------------------------------------------------------------------------------------------------------------------------------+ + +----------------+----------+---------------+---------------------------+ + | Key | Type | Optionality | Description | + +================+==========+===============+===========================+ + | ``status`` | string | Optional | | Filters the status of | + | | | | issues. 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 | + +----------------+----------+---------------+---------------------------+ + | ``assignee`` | string | Optional | | Filter the issues | + | | | | by assignee | + +----------------+----------+---------------+---------------------------+ + | ``author`` | string | Optional | | Filter the issues | + | | | | by creator | + +----------------+----------+---------------+---------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -455,11 +468,12 @@ def api_comment_issue(repo, issueid, username=None): Input ^^^^^ - +---------------+----------+---------------+-----------------------------------+ - | Key | Type | Optionality | Description | - +===============+==========+===============+===================================+ - | ``comment`` | string | Mandatory | The comment to add to the issue | - +---------------+----------+---------------+-----------------------------------+ + +---------------+----------+---------------+---------------------------+ + | Key | Type | Optionality | Description | + +===============+==========+===============+===========================+ + | ``comment`` | string | Mandatory | | The comment to add to | + | | | | the issue | + +---------------+----------+---------------+---------------------------+ Sample response ^^^^^^^^^^^^^^^