docs: def get_issues(repo_name=None,
                 profile='github',
                 milestone=None,
                 state='open',
                 assignee=None,
                 creator=None,
                 mentioned=None,
                 labels=None,
                 sort='created',
                 direction='desc',
                 since=None,
                 output='min',
                 per_page=None):
      '''
      Returns information for all issues in a given repository, based on the search options.
  
      .. versionadded:: 2016.11.0
  
      repo_name
          The name of the repository for which to list issues. This argument is
          required, either passed via the CLI, or defined in the configured
          profile. A ``repo_name`` passed as a CLI argument will override the
          repo_name defined in the configured profile, if provided.
  
      profile
          The name of the profile configuration to use. Defaults to ``github``.
  
      milestone
          The number of a GitHub milestone, or a string of either ``*`` or
          ``none``.
  
          If a number is passed, it should refer to a milestone by its number
          field. Use the ``github.get_milestone`` function to obtain a milestone's
          number.
  
          If the string ``*`` is passed, issues with any milestone are
          accepted. If the string ``none`` is passed, issues without milestones
          are returned.
  
      state
          Indicates the state of the issues to return. Can be either ``open``,
          ``closed``, or ``all``. Default is ``open``.
  
      assignee
          Can be the name of a user. Pass in ``none`` (as a string) for issues
          with no assigned user or ``*`` for issues assigned to any user.
  
      creator
          The user that created the issue.
  
      mentioned
          A user that's mentioned in the issue.
  
      labels
          A string of comma separated label names. For example, ``bug,ui,@high``.
  
      sort
          What to sort results by. Can be either ``created``, ``updated``, or
          ``comments``. Default is ``created``.
  
      direction
          The direction of the sort. Can be either ``asc`` or ``desc``. Default
          is ``desc``.
  
      since
          Only issues updated at or after this time are returned. This is a
          timestamp in ISO 8601 format: ``YYYY-MM-DDTHH:MM:SSZ``.
  
      output
          The amount of data returned by each issue. Defaults to ``min``. Change
          to ``full`` to see all issue output.
  
      per_page
          GitHub paginates data in their API calls. Use this value to increase or
          decrease the number of issues gathered from GitHub, per page. If not set,
          GitHub defaults are used. Maximum is 100.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion github.get_issues my-github-repo
      '''
      org_name = _get_config_value(profile, 'org_name')
      if repo_name is None:
          repo_name = _get_config_value(profile, 'repo_name')
  
      action = '/'.join(['repos', org_name, repo_name])
      args = {}
  
      # Build API arguments, as necessary.
      if milestone:
          args['milestone'] = milestone
      if assignee:
          args['assignee'] = assignee
      if creator:
          args['creator'] = creator
      if mentioned:
          args['mentioned'] = mentioned
      if labels:
          args['labels'] = labels
      if since:
          args['since'] = since
      if per_page:
          args['per_page'] = per_page
  
      # Only pass the following API args if they're not the defaults listed.
      if state and state != 'open':
          args['state'] = state
      if sort and sort != 'created':
          args['sort'] = sort
      if direction and direction != 'desc':
          args['direction'] = direction
  
      ret = {}
      issues = _query(profile, action=action, command='issues', args=args)
  
      for issue in issues:
          # Pull requests are included in the issue list from GitHub
          # Let's not include those in the return.
          if issue.get('pull_request'):
              continue
          issue_id = issue.get('id')
          if output == 'full':
              ret[issue_id] = issue
          else:
              ret[issue_id] = _format_issue(issue)
  
      return ret