<commit_before>//
//  Issue.swift
//  Tentacle
//
//  Created by <NAME> on 2016-05-23.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

extension Repository {
    /// A request for issues in the repository.
    ///
    /// https://developer.github.com/v3/issues/#list-issues-for-a-repository
    public var issues: Request<[Issue]> {
        return Request(method: .get, path: "/repos/\(owner)/\(name)/issues")
    }
}

/// An Issue on Github
public struct Issue: CustomStringConvertible, ResourceType, Identifiable {<commit_msg>Add function to retrieve an issue in the repository<commit_after>//
//  Issue.swift
//  Tentacle
//
//  Created by <NAME> on 2016-05-23.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

extension Repository {
    /// A request for issues in the repository.
    ///
    /// https://developer.github.com/v3/issues/#list-issues-for-a-repository
    public var issues: Request<[Issue]> {
        return Request(method: .get, path: "/repos/\(owner)/\(name)/issues")
    }

    /// A request for an issue in the repository
    ///
    ///
    public func issue(id: ID<Issue>) -> Request<Issue> {
        return Request(method: .get, path: "/repos/\(owner)/\(name)/issues/\(id.string)")
    }
}

/// An Issue on Github
public struct Issue: CustomStringConvertible, ResourceType, Identifiable {
{'fraction_non_alphanumeric': 0.15627292736610418, 'fraction_numerical': 0.019075568598679385, 'mean_word_length': 2.6470588235294117, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 2, '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': '2333230', 'n_tokens_mistral': 445, 'n_tokens_neox': 407, 'n_words': 118}