Table of Contents

Class GitPullRequestTrigger

Namespace
Invex.Atom.Workflows.Definition.Triggers
Assembly
Invex.Atom.Workflows.dll

Represents a workflow trigger that activates on Git pull request events.

public sealed record GitPullRequestTrigger : IWorkflowTrigger
Inheritance
object
GitPullRequestTrigger
Implements

Examples

// Trigger on pull requests into the main branch
var mainPrTrigger = GitPullRequestTrigger.IntoMain;
// Trigger on pull requests that modify files in the 'src' directory
var srcPrTrigger = new GitPullRequestTrigger
{
    IncludedPaths = ["src/**"]
};

Remarks

This trigger provides fine-grained control over activation conditions through branch patterns, file path filters, and pull request event types. GitHub Actions does not allow a filter and its -ignore counterpart on the same event, so when both an included and an excluded list are set, the GitHub workflow writes the exclusions as negated (!) patterns after the inclusions.

Constructors

GitPullRequestTrigger()

public GitPullRequestTrigger()

Properties

ExcludedBranches

Gets the list of branch patterns that should NOT trigger the workflow. Takes precedence over IncludedBranches.

public IReadOnlyList<string> ExcludedBranches { get; init; }

Property Value

IReadOnlyList<string>

ExcludedPaths

Gets the list of file path patterns that should NOT activate the trigger. Takes precedence over IncludedPaths.

public IReadOnlyList<string> ExcludedPaths { get; init; }

Property Value

IReadOnlyList<string>

IncludedBranches

Gets the list of branch patterns that should trigger the workflow. Supports glob patterns.

public IReadOnlyList<string> IncludedBranches { get; init; }

Property Value

IReadOnlyList<string>

IncludedPaths

Gets the list of file path patterns that must be affected for the trigger to activate. Supports glob patterns.

public IReadOnlyList<string> IncludedPaths { get; init; }

Property Value

IReadOnlyList<string>

Types

Gets the list of pull request event types that should activate this trigger (e.g., "opened", "synchronize").

public IReadOnlyList<string> Types { get; init; }

Property Value

IReadOnlyList<string>