Ejemplo n.º 1
0
        /// <inheritdoc />
        public async Task UpdateApplicationAuthorizationPolicyAsync(
            string org,
            string app,
            string fullCommitId,
            EnvironmentModel deploymentEnvironment)
        {
            string policyFile = await GetAuthorizationPolicyFileFromGitea(org, app, fullCommitId);

            await _authorizationPolicyClient.SavePolicy(org, app, policyFile, deploymentEnvironment);
        }
        /// <inheritdoc />
        public async Task UpdateApplicationAuthorizationPolicyAsync(
            string org,
            string app,
            string shortCommitId,
            EnvironmentModel deploymentEnvironment)
        {
            GiteaFileContent policyFile = await GetAuthorizationPolicyFileFromGitea(org, app, shortCommitId);

            byte[] data = Convert.FromBase64String(policyFile.Content);
            string policyFileContent = Encoding.UTF8.GetString(data);
            await _authorizationPolicyClient.SavePolicy(org, app, policyFileContent, deploymentEnvironment);
        }