Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d127cadd3 | ||
|
|
97e81c3af4 | ||
|
|
071aa73015 |
@@ -4,7 +4,9 @@ name: Create and publish a Docker image
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ public class App : IApp
|
|||||||
ServerCertificateCustomValidationCallback = (_, _, _, _) => true
|
ServerCertificateCustomValidationCallback = (_, _, _, _) => true
|
||||||
};
|
};
|
||||||
_settings = new Settings();
|
_settings = new Settings();
|
||||||
if (string.IsNullOrEmpty(_settings.GitlabUrl))
|
|
||||||
{
|
|
||||||
Console.WriteLine("CI_SERVER_URL is not defined.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_client = new GitLabClient(_settings.GitlabUrl, _settings.GitlabToken, httpHandler);
|
_client = new GitLabClient(_settings.GitlabUrl, _settings.GitlabToken, httpHandler);
|
||||||
_customClient = new GitlabCustomClient(_settings.GitlabUrl, _settings.GitlabToken, httpHandler);
|
_customClient = new GitlabCustomClient(_settings.GitlabUrl, _settings.GitlabToken, httpHandler);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ namespace Approve.Checker.Gitlab;
|
|||||||
public class ApproversDto
|
public class ApproversDto
|
||||||
{
|
{
|
||||||
public int CountApprovers { get; set; } = 1;
|
public int CountApprovers { get; set; } = 1;
|
||||||
public List<string> Users { get; set; }
|
public List<string> Users { get; set; } = new();
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ namespace Approve.Checker.Gitlab
|
|||||||
public string GitlabToken = Environment.GetEnvironmentVariable("GITLAB_TOKEN") ?? CheckAndThrow("GITLAB_TOKEN");
|
public string GitlabToken = Environment.GetEnvironmentVariable("GITLAB_TOKEN") ?? CheckAndThrow("GITLAB_TOKEN");
|
||||||
public string MrPath = Environment.GetEnvironmentVariable("CI_OPEN_MERGE_REQUESTS")!;
|
public string MrPath = Environment.GetEnvironmentVariable("CI_OPEN_MERGE_REQUESTS")!;
|
||||||
public string ProjectId = Environment.GetEnvironmentVariable("CI_PROJECT_ID") ?? CheckAndThrow("CI_PROJECT_ID");
|
public string ProjectId = Environment.GetEnvironmentVariable("CI_PROJECT_ID") ?? CheckAndThrow("CI_PROJECT_ID");
|
||||||
public string Approvers = Environment.GetEnvironmentVariable("APPROVERS_FILEPATH ") ?? CheckAndThrow("APPROVERS_FILEPATH");
|
public string Approvers = Environment.GetEnvironmentVariable("APPROVERS_FILEPATH") ?? CheckAndThrow("APPROVERS_FILEPATH");
|
||||||
|
|
||||||
private static string CheckAndThrow(string name)
|
private static string CheckAndThrow(string name)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user