mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
check new branch in config
This commit is contained in:
@@ -20,7 +20,7 @@ public class Context : FrostingContext
|
||||
public bool IsPullRequest { get; set; }
|
||||
public bool IsOriginalRepo { get; set; }
|
||||
public bool IsTagged { get; set; }
|
||||
public bool IsMasterBranch { get; set; }
|
||||
public bool IsMainBranch { get; set; }
|
||||
public bool ForcePublish { get; set; }
|
||||
|
||||
public bool AppVeyor { get; set; }
|
||||
|
||||
@@ -29,13 +29,13 @@ public class Lifetime : FrostingLifetime<Context>
|
||||
{
|
||||
context.IsPullRequest = buildSystem.AppVeyor.Environment.PullRequest.IsPullRequest;
|
||||
context.IsOriginalRepo = StringComparer.OrdinalIgnoreCase.Equals("octokit/octokit.net", buildSystem.AppVeyor.Environment.Repository.Name);
|
||||
context.IsMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("master", buildSystem.AppVeyor.Environment.Repository.Branch);
|
||||
context.IsMainBranch = StringComparer.OrdinalIgnoreCase.Equals("main", buildSystem.AppVeyor.Environment.Repository.Branch);
|
||||
}
|
||||
else if (context.GitHubActions)
|
||||
{
|
||||
context.IsPullRequest = buildSystem.GitHubActions.Environment.PullRequest.IsPullRequest;
|
||||
context.IsOriginalRepo = StringComparer.OrdinalIgnoreCase.Equals("octokit/octokit.net", buildSystem.GitHubActions.Environment.Workflow.Repository);
|
||||
context.IsMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("master", buildSystem.GitHubActions.Environment.Workflow.Ref);
|
||||
context.IsMainBranch = StringComparer.OrdinalIgnoreCase.Equals("main", buildSystem.GitHubActions.Environment.Workflow.Ref);
|
||||
}
|
||||
|
||||
// Force publish?
|
||||
|
||||
Reference in New Issue
Block a user