<commit_before># encoding: utf-8

module Github

  # The Pages API retrieves information about your GitHub Pages configuration,
  # and the statuses of your builds. Information about the site and the builds
  # can only be accessed by authenticated owners, even though the websites
  # are public.
  class Repos::Pages < API

    # List Pages builds
    #
    # @example
    #  github = Github.new
    #  github.repos.pages.list owner: 'owner-name', repo: 'repo-name'
    #
    #  github = Github.new
    #  github.repos.pages.list :latest, owner: 'owner-name', repo: 'repo-name'
    # @api public
    def list(*args)
      arguments(args, required: [:owner, :repo])
      params = arguments.params

      response = if args.map(&:to_s).include?('latest')
        get_request("/repos/#{owner}/#{repo}/pages/builds/latest")
      else
        get_request("/repos/#{owner}/#{repo}/pages/builds")
      end
      return response unless block_given?
      response.each { |el| yield el }
    end
    alias :all :list

    # Get information about a Pages site
    #
    # @example
    #  github = Github.new
    #  github.repos.pages.get owner: 'owner-name', repo: 'repo-name'
    #
    # @api public
    def get(*args)
      arguments(args, required: [:owner, :repo])

      get_request("/repos/#{owner}/#{repo}/pages", arguments.params)<commit_msg>Fix params in pages api.<commit_after># encoding: utf-8

module Github

  # The Pages API retrieves information about your GitHub Pages configuration,
  # and the statuses of your builds. Information about the site and the builds
  # can only be accessed by authenticated owners, even though the websites
  # are public.
  class Repos::Pages < API

    # List Pages builds
    #
    # @example
    #  github = Github.new
    #  github.repos.pages.list owner: 'owner-name', repo: 'repo-name'
    #
    #  github = Github.new
    #  github.repos.pages.list :latest, owner: 'owner-name', repo: 'repo-name'
    # @api public
    def list(*args)
      arguments(args, required: [:owner, :repo])
      params = arguments.params

      response = if args.map(&:to_s).include?('latest')
        get_request("/repos/#{owner}/#{repo}/pages/builds/latest", params)
      else
        get_request("/repos/#{owner}/#{repo}/pages/builds", params)
      end
      return response unless block_given?
      response.each { |el| yield el }
    end
    alias :all :list

    # Get information about a Pages site
    #
    # @example
    #  github = Github.new
    #  github.repos.pages.get owner: 'owner-name', repo: 'repo-name'
    #
    # @api public
    def get(*args)
      arguments(args, required: [:owner, :repo])

      get_request("/repos/#{owner}/#{repo}/pages", arguments.params)
{'fraction_non_alphanumeric': 0.1291866028708134, 'fraction_numerical': 0.000736105999263894, 'mean_word_length': 2.775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '750237', 'n_tokens_mistral': 871, 'n_tokens_neox': 827, 'n_words': 237}