�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z d d
l
m Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
module: github_issue
short_description: View GitHub issue.
description:
- View GitHub issue for a given repository and organization.
version_added: "2.4"
options:
repo:
description:
- Name of repository from which issue needs to be retrieved.
required: true
organization:
description:
- Name of the GitHub organization in which the repository is hosted.
required: true
issue:
description:
- Issue number for which information is required.
required: true
action:
description:
- Get various details about issue depending upon action specified.
default: 'get_status'
choices:
- 'get_status'
author:
- Abhijeet Kasurde (@Akasurde)
su
get_status:
description: State of the GitHub issue
type: str
returned: success
sample: open, closed
s,
- name: Check if GitHub issue is closed or not
github_issue:
organization: ansible
repo: ansible
issue: 23642
action: get_status
register: r
- name: Take action depending upon issue status
debug:
msg: Do something when issue 23642 is open
when: r.issue_status == 'open'
N( t
AnsibleModule( t fetch_urlc C` s� t d t d t d t � d t d t � d t d d d t � d t d d
g d d
� � d t � } | j d } | j d } | j d } | j d } t � } i d
d 6d d 6} d | | | f } t | | d | �\ } } d | d k o� d k n sJ| d d k r)| j d d | � n | j d d | | d f � n t j | j � � }
| d
k sw| d k r�| j
r�| j d t � q�| j d t d |
d � n | j | � d S( Nt
argument_spect organizationt requiredt repot issuet typet intt actiont choicest
get_statust defaultt supports_check_modes application/jsons Content-Types application/vnd.github.v3+jsont Accepts, https://api.github.com/repos/%s/%s/issues/%st headersi� R i� i� t msgs Failed to find issue %ss Failed to send request to %s: %st changedt issue_statust state(
R t dictt Truet paramsR t fail_jsont jsont loadst readt Nonet
check_modet updatet exit_json( t moduleR R
R R t resultR t urlt responset infot gh_obj( ( sO /usr/lib/python2.7/site-packages/ansible/modules/source_control/github_issue.pyt mainL s6
! t __main__( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt RETURNt EXAMPLESR t ansible.module_utils.basicR t ansible.module_utils.urlsR R- t __name__( ( ( sO /usr/lib/python2.7/site-packages/ansible/modules/source_control/github_issue.pyt <module> s
*
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]