ebuildy.cidre.platform (0.6.0) — module

Call Github or Gitlab HTTP API

Authors: Thomas Decaux (@ebuildy)

Install collection

Install with ansible-galaxy collection install ebuildy.cidre:==0.6.0


Add to requirements.yml

  collections:
    - name: ebuildy.cidre
      version: 0.6.0

Description

Call Github or Gitlab HTTP API


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Search a milestone
  ebuildy.cidre.platform:
    platform: gitlab
    resource: milestones
    action: get
    context:
      project: 12
    query_string:
        title: "{{ project.version_wanted }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create an issue
  ebuildy.cidre.platform:
    platform: gitlab
    resource: issues
    action: create
    context:
      project: 12
    data:
        title: "Just a text"
        description: "Ok I am a test"
        milestone_id: 1

Inputs

    
data:
    description:
    - Data to send as JSON body
    type: raw

action:
    choices:
    - get
    - update
    - delete
    - create
    default: get
    description:
    - HTTP method
    type: str

context:
    description:
    - Related project / user / issue / milestone ID
    type: raw

resource:
    description:
    - Query string
    type: str

cidre_repo:
    description:
    - repo ID or path name or for github user/repo
    type: str

body_format:
    default: json
    type: str

query_string:
    description:
    - Data to send as JSON body
    type: raw

cidre_platform:
    choices:
    - github
    - gitlab
    - bitbucket
    description:
    - gitlab / github
    type: str

cidre_platform_url:
    description:
    - Full URL to API, default to public URL
    type: str

cidre_platform_access_token:
    description:
    - access_token to use, default to env platform_TOKEN / GITLAB_TOKEN
    type: str

Outputs

result:
  description:
  - The platform API response.
  returned: success
  type: complex