Esempio n. 1
0
 private void MapProperties(ReleaserSettings settings)
 {
     IsChangelogFileCreationEnabled = settings.IsChangelogFileCreationEnabled;
     IsUpdateOnly           = settings.IsUpdateOnly;
     ReleaseAttachments     = settings.ReleaseAttachments;
     IssueFilterLabel       = settings.IssueFilterLabel;
     IssueLabels            = settings.IssueLabels;
     IsPreRelease           = settings.IsPreRelease;
     IsDraft                = settings.IsDraft;
     DeleteFilesAfterUpload = settings.DeleteFilesAfterUpload;
     FileForVersion         = settings.FileForVersion;
     GitHubToken            = settings.GitHubToken;
     GitHubRepo             = settings.GitHubRepo;
 }
Esempio n. 2
0
        public Releaser(ReleaserSettings releaserSettings)
        {
            Settings = releaserSettings;
            var fileVersion = FileVersionInfo.GetVersionInfo(Settings.FileForVersion);
            var version     = new Version(fileVersion.FileVersion);

            VersionMilestone = version.ToString(3);
            VersionFull      = version.ToString();

            var split = Settings.GitHubRepo.Split('/');

            Account = split.First();
            Repo    = split.Last();

            // GitHub
            ServicePointManager.SecurityProtocol =
                SecurityProtocolType.Tls12; // needed https://github.com/octokit/octokit.net/issues/1756
            var connection = new Connection(new ProductHeaderValue(Repo));

            Client = new GitHubClient(connection);
            var tokenAuth = new Credentials(Settings.GitHubToken);

            Client.Credentials = tokenAuth;
        }