Exemple #1
0
        public BuildStatussesPluginCollector()
        {
            //TODO: Why is this needed for valid https/ssl website?
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            m_EnvConfig = EnvConfig.LoadFromEnvironment();
        }
Exemple #2
0
        public static EnvConfig LoadFromEnvironment()
        {
            var envFilePath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config", "win-eye", ".env");
            var env         = DotEnvFile.DotEnvFile.LoadFile(envFilePath, true);

            DotEnvFile.DotEnvFile.InjectIntoEnvironment(env);

            var cfg = new EnvConfig(env["DRONE_URL"], env["DRONE_TOKEN"], env["DRONE_REPO_PATHS"]);

            cfg.Validate();
            return(cfg);
        }