 import Foundation
 import Rainbow
+
+public typealias Tag = String
+public typealias Head = String
 
 public struct Repository: Decodable {
     public let nameWithOwner: String

        let stargazersContainer = try container.nestedContainer(keyedBy: TotalCountContainer.self, forKey: .stargazers)
        self.stargazers = try stargazersContainer.decode(Int.self, forKey: .totalCount)

        let tagsEdgesContainer = try container.nestedContainer(keyedBy: EdgesKeys.self, forKey: .tags)
        self.tags = try tagsEdgesContainer.decode([Tag].self, forKey: .edges)

        let packageManifestContainer = try? container.nestedContainer(keyedBy: PackageManifestContainer.self, forKey: .packageManifest)
        if let _ = packageManifestContainer {
            self.hasPackageManifest = true

    public let license: String?
    public let openIssues: Int
    public let stargazers: Int
    public var tags: [Tag] = []
    public var heads: [Head] = []
    public let hasPackageManifest: Bool

    public var owner: String {
