Skip to content
Back to top
View this page

# action

This module contains functionality required when using chango in GitHub Actions.

class chango.action.ChanGoActionData(*, parent_pull_request, linked_issues)

  Data structure for the additional information that the `chango` action automatically provides in addition to the GitHub event payload.

  Parameters:

    - parent_pull_request (`ParentPullRequest` | `None`) – If there is a pull request associated with the target branch of the current pull request, this field contains information about it.

    - linked_issues (tuple[`LinkedIssue`], optional) – Information about linked issues, i.e., issues that will be closed when the current pull request is merged.

  parent_pull_request

    Optional. If there is a pull request associated with the target branch of the current pull request, this field contains information about it.

    Type:

      `ParentPullRequest`

  linked_issues

    Optional. Information about linked issues, i.e., issues that will be closed when the current pull request is merged.

    Type:

      tuple[`LinkedIssue`]

class chango.action.LinkedIssue(*, number, title, labels, issue_type=None)

  Data structure for an issue linked in a GitHub pull request.

  Parameters:

    - number (`int`) – The issue number.

    - title (`str`) – The title of the issue.

    - labels (tuple[`str`], optional) – The labels of the issue.

    - issue_type (`str`, optional) – The type of the issue.

  number

    The issue number.

    Type:

      `int`

  title

    The title of the issue.

    Type:

      `str`

  labels

    Optional. The labels of the issue.

    Type:

      tuple[`str`]

  issue_type

    Optional. The type of the issue.

    Type:

      `str`

class chango.action.ParentPullRequest(*, number, author_login, title, url, state)

  Data structure for a pull request associated with the target branch of the current pull request.

  Parameters:

    - number (`int`) – The pull request number.

    - title (`str`) – The title of the pull request.

    - url (`str`) – The URL of the pull request.

    - state (`str`) – The state of the pull request. Possible values are `open`, `closed`, and `merged`.

  number

    The pull request number.

    Type:

      `int`

  author_login

    The login of the author of the pull request.

    Type:

      `str`

  title

    The title of the pull request.

    Type:

      `str`

  url

    The URL of the pull request.

    Type:

      `str`

  state

    The state of the pull request. Possible values are `OPEN`, `CLOSED`, and `MERGED`.

    Type:

      `str`