mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00
22 lines
636 B
C#
22 lines
636 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Spectre.Console.Enrichment
|
|
{
|
|
internal sealed class BitbucketEnricher : IProfileEnricher
|
|
{
|
|
public string Name => "Bitbucket";
|
|
|
|
public bool Enabled(IDictionary<string, string> environmentVariables)
|
|
{
|
|
return environmentVariables.ContainsKey("BITBUCKET_REPO_OWNER") ||
|
|
environmentVariables.ContainsKey("BITBUCKET_REPO_SLUG") ||
|
|
environmentVariables.ContainsKey("BITBUCKET_COMMIT");
|
|
}
|
|
|
|
public void Enrich(Profile profile)
|
|
{
|
|
profile.Capabilities.Interactive = false;
|
|
}
|
|
}
|
|
}
|