1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. BranchPolicyAutoReviewers
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

azuredevops.BranchPolicyAutoReviewers

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

    Manages required reviewer policy branch policy within Azure DevOps.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = new azuredevops.Project("example", {name: "Example Project"});
    const exampleGit = new azuredevops.Git("example", {
        projectId: example.id,
        name: "Example Repository",
        initialization: {
            initType: "Clean",
        },
    });
    const exampleUser = new azuredevops.User("example", {
        principalName: "mail@email.com",
        accountLicenseType: "basic",
    });
    const exampleBranchPolicyAutoReviewers = new azuredevops.BranchPolicyAutoReviewers("example", {
        projectId: example.id,
        enabled: true,
        blocking: true,
        settings: {
            autoReviewerIds: [exampleUser.id],
            submitterCanVote: false,
            message: "Auto reviewer",
            pathFilters: ["*/src/*.ts"],
            scopes: [{
                repositoryId: exampleGit.id,
                repositoryRef: exampleGit.defaultBranch,
                matchType: "Exact",
            }],
        },
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example", name="Example Project")
    example_git = azuredevops.Git("example",
        project_id=example.id,
        name="Example Repository",
        initialization={
            "init_type": "Clean",
        })
    example_user = azuredevops.User("example",
        principal_name="mail@email.com",
        account_license_type="basic")
    example_branch_policy_auto_reviewers = azuredevops.BranchPolicyAutoReviewers("example",
        project_id=example.id,
        enabled=True,
        blocking=True,
        settings={
            "auto_reviewer_ids": [example_user.id],
            "submitter_can_vote": False,
            "message": "Auto reviewer",
            "path_filters": ["*/src/*.ts"],
            "scopes": [{
                "repository_id": example_git.id,
                "repository_ref": example_git.default_branch,
                "match_type": "Exact",
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name: pulumi.String("Example Project"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleGit, err := azuredevops.NewGit(ctx, "example", &azuredevops.GitArgs{
    			ProjectId: example.ID(),
    			Name:      pulumi.String("Example Repository"),
    			Initialization: &azuredevops.GitInitializationArgs{
    				InitType: pulumi.String("Clean"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleUser, err := azuredevops.NewUser(ctx, "example", &azuredevops.UserArgs{
    			PrincipalName:      pulumi.String("mail@email.com"),
    			AccountLicenseType: pulumi.String("basic"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewBranchPolicyAutoReviewers(ctx, "example", &azuredevops.BranchPolicyAutoReviewersArgs{
    			ProjectId: example.ID(),
    			Enabled:   pulumi.Bool(true),
    			Blocking:  pulumi.Bool(true),
    			Settings: &azuredevops.BranchPolicyAutoReviewersSettingsArgs{
    				AutoReviewerIds: pulumi.StringArray{
    					exampleUser.ID(),
    				},
    				SubmitterCanVote: pulumi.Bool(false),
    				Message:          pulumi.String("Auto reviewer"),
    				PathFilters: pulumi.StringArray{
    					pulumi.String("*/src/*.ts"),
    				},
    				Scopes: azuredevops.BranchPolicyAutoReviewersSettingsScopeArray{
    					&azuredevops.BranchPolicyAutoReviewersSettingsScopeArgs{
    						RepositoryId:  exampleGit.ID(),
    						RepositoryRef: exampleGit.DefaultBranch,
    						MatchType:     pulumi.String("Exact"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
        });
    
        var exampleGit = new AzureDevOps.Git("example", new()
        {
            ProjectId = example.Id,
            Name = "Example Repository",
            Initialization = new AzureDevOps.Inputs.GitInitializationArgs
            {
                InitType = "Clean",
            },
        });
    
        var exampleUser = new AzureDevOps.User("example", new()
        {
            PrincipalName = "mail@email.com",
            AccountLicenseType = "basic",
        });
    
        var exampleBranchPolicyAutoReviewers = new AzureDevOps.BranchPolicyAutoReviewers("example", new()
        {
            ProjectId = example.Id,
            Enabled = true,
            Blocking = true,
            Settings = new AzureDevOps.Inputs.BranchPolicyAutoReviewersSettingsArgs
            {
                AutoReviewerIds = new[]
                {
                    exampleUser.Id,
                },
                SubmitterCanVote = false,
                Message = "Auto reviewer",
                PathFilters = new[]
                {
                    "*/src/*.ts",
                },
                Scopes = new[]
                {
                    new AzureDevOps.Inputs.BranchPolicyAutoReviewersSettingsScopeArgs
                    {
                        RepositoryId = exampleGit.Id,
                        RepositoryRef = exampleGit.DefaultBranch,
                        MatchType = "Exact",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.Git;
    import com.pulumi.azuredevops.GitArgs;
    import com.pulumi.azuredevops.inputs.GitInitializationArgs;
    import com.pulumi.azuredevops.User;
    import com.pulumi.azuredevops.UserArgs;
    import com.pulumi.azuredevops.BranchPolicyAutoReviewers;
    import com.pulumi.azuredevops.BranchPolicyAutoReviewersArgs;
    import com.pulumi.azuredevops.inputs.BranchPolicyAutoReviewersSettingsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Project("example", ProjectArgs.builder()
                .name("Example Project")
                .build());
    
            var exampleGit = new Git("exampleGit", GitArgs.builder()
                .projectId(example.id())
                .name("Example Repository")
                .initialization(GitInitializationArgs.builder()
                    .initType("Clean")
                    .build())
                .build());
    
            var exampleUser = new User("exampleUser", UserArgs.builder()
                .principalName("mail@email.com")
                .accountLicenseType("basic")
                .build());
    
            var exampleBranchPolicyAutoReviewers = new BranchPolicyAutoReviewers("exampleBranchPolicyAutoReviewers", BranchPolicyAutoReviewersArgs.builder()
                .projectId(example.id())
                .enabled(true)
                .blocking(true)
                .settings(BranchPolicyAutoReviewersSettingsArgs.builder()
                    .autoReviewerIds(exampleUser.id())
                    .submitterCanVote(false)
                    .message("Auto reviewer")
                    .pathFilters("*/src/*.ts")
                    .scopes(BranchPolicyAutoReviewersSettingsScopeArgs.builder()
                        .repositoryId(exampleGit.id())
                        .repositoryRef(exampleGit.defaultBranch())
                        .matchType("Exact")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
      exampleGit:
        type: azuredevops:Git
        name: example
        properties:
          projectId: ${example.id}
          name: Example Repository
          initialization:
            initType: Clean
      exampleUser:
        type: azuredevops:User
        name: example
        properties:
          principalName: mail@email.com
          accountLicenseType: basic
      exampleBranchPolicyAutoReviewers:
        type: azuredevops:BranchPolicyAutoReviewers
        name: example
        properties:
          projectId: ${example.id}
          enabled: true
          blocking: true
          settings:
            autoReviewerIds:
              - ${exampleUser.id}
            submitterCanVote: false
            message: Auto reviewer
            pathFilters:
              - '*/src/*.ts'
            scopes:
              - repositoryId: ${exampleGit.id}
                repositoryRef: ${exampleGit.defaultBranch}
                matchType: Exact
    

    Create BranchPolicyAutoReviewers Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BranchPolicyAutoReviewers(name: string, args: BranchPolicyAutoReviewersArgs, opts?: CustomResourceOptions);
    @overload
    def BranchPolicyAutoReviewers(resource_name: str,
                                  args: BranchPolicyAutoReviewersArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def BranchPolicyAutoReviewers(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  project_id: Optional[str] = None,
                                  settings: Optional[BranchPolicyAutoReviewersSettingsArgs] = None,
                                  blocking: Optional[bool] = None,
                                  enabled: Optional[bool] = None)
    func NewBranchPolicyAutoReviewers(ctx *Context, name string, args BranchPolicyAutoReviewersArgs, opts ...ResourceOption) (*BranchPolicyAutoReviewers, error)
    public BranchPolicyAutoReviewers(string name, BranchPolicyAutoReviewersArgs args, CustomResourceOptions? opts = null)
    public BranchPolicyAutoReviewers(String name, BranchPolicyAutoReviewersArgs args)
    public BranchPolicyAutoReviewers(String name, BranchPolicyAutoReviewersArgs args, CustomResourceOptions options)
    
    type: azuredevops:BranchPolicyAutoReviewers
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BranchPolicyAutoReviewersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BranchPolicyAutoReviewersArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BranchPolicyAutoReviewersArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BranchPolicyAutoReviewersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BranchPolicyAutoReviewersArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var branchPolicyAutoReviewersResource = new AzureDevOps.BranchPolicyAutoReviewers("branchPolicyAutoReviewersResource", new()
    {
        ProjectId = "string",
        Settings = new AzureDevOps.Inputs.BranchPolicyAutoReviewersSettingsArgs
        {
            AutoReviewerIds = new[]
            {
                "string",
            },
            Scopes = new[]
            {
                new AzureDevOps.Inputs.BranchPolicyAutoReviewersSettingsScopeArgs
                {
                    MatchType = "string",
                    RepositoryId = "string",
                    RepositoryRef = "string",
                },
            },
            Message = "string",
            MinimumNumberOfReviewers = 0,
            PathFilters = new[]
            {
                "string",
            },
            SubmitterCanVote = false,
        },
        Blocking = false,
        Enabled = false,
    });
    
    example, err := azuredevops.NewBranchPolicyAutoReviewers(ctx, "branchPolicyAutoReviewersResource", &azuredevops.BranchPolicyAutoReviewersArgs{
    	ProjectId: pulumi.String("string"),
    	Settings: &azuredevops.BranchPolicyAutoReviewersSettingsArgs{
    		AutoReviewerIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Scopes: azuredevops.BranchPolicyAutoReviewersSettingsScopeArray{
    			&azuredevops.BranchPolicyAutoReviewersSettingsScopeArgs{
    				MatchType:     pulumi.String("string"),
    				RepositoryId:  pulumi.String("string"),
    				RepositoryRef: pulumi.String("string"),
    			},
    		},
    		Message:                  pulumi.String("string"),
    		MinimumNumberOfReviewers: pulumi.Int(0),
    		PathFilters: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SubmitterCanVote: pulumi.Bool(false),
    	},
    	Blocking: pulumi.Bool(false),
    	Enabled:  pulumi.Bool(false),
    })
    
    var branchPolicyAutoReviewersResource = new BranchPolicyAutoReviewers("branchPolicyAutoReviewersResource", BranchPolicyAutoReviewersArgs.builder()
        .projectId("string")
        .settings(BranchPolicyAutoReviewersSettingsArgs.builder()
            .autoReviewerIds("string")
            .scopes(BranchPolicyAutoReviewersSettingsScopeArgs.builder()
                .matchType("string")
                .repositoryId("string")
                .repositoryRef("string")
                .build())
            .message("string")
            .minimumNumberOfReviewers(0)
            .pathFilters("string")
            .submitterCanVote(false)
            .build())
        .blocking(false)
        .enabled(false)
        .build());
    
    branch_policy_auto_reviewers_resource = azuredevops.BranchPolicyAutoReviewers("branchPolicyAutoReviewersResource",
        project_id="string",
        settings={
            "auto_reviewer_ids": ["string"],
            "scopes": [{
                "match_type": "string",
                "repository_id": "string",
                "repository_ref": "string",
            }],
            "message": "string",
            "minimum_number_of_reviewers": 0,
            "path_filters": ["string"],
            "submitter_can_vote": False,
        },
        blocking=False,
        enabled=False)
    
    const branchPolicyAutoReviewersResource = new azuredevops.BranchPolicyAutoReviewers("branchPolicyAutoReviewersResource", {
        projectId: "string",
        settings: {
            autoReviewerIds: ["string"],
            scopes: [{
                matchType: "string",
                repositoryId: "string",
                repositoryRef: "string",
            }],
            message: "string",
            minimumNumberOfReviewers: 0,
            pathFilters: ["string"],
            submitterCanVote: false,
        },
        blocking: false,
        enabled: false,
    });
    
    type: azuredevops:BranchPolicyAutoReviewers
    properties:
        blocking: false
        enabled: false
        projectId: string
        settings:
            autoReviewerIds:
                - string
            message: string
            minimumNumberOfReviewers: 0
            pathFilters:
                - string
            scopes:
                - matchType: string
                  repositoryId: string
                  repositoryRef: string
            submitterCanVote: false
    

    BranchPolicyAutoReviewers Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BranchPolicyAutoReviewers resource accepts the following input properties:

    ProjectId string
    The ID of the project in which the policy will be created.
    Settings Pulumi.AzureDevOps.Inputs.BranchPolicyAutoReviewersSettings
    Configuration for the policy. This block must be defined exactly once.
    Blocking bool
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    ProjectId string
    The ID of the project in which the policy will be created.
    Settings BranchPolicyAutoReviewersSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    Blocking bool
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings BranchPolicyAutoReviewersSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId string
    The ID of the project in which the policy will be created.
    settings BranchPolicyAutoReviewersSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking boolean
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    project_id str
    The ID of the project in which the policy will be created.
    settings BranchPolicyAutoReviewersSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    blocking bool
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings Property Map
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BranchPolicyAutoReviewers resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BranchPolicyAutoReviewers Resource

    Get an existing BranchPolicyAutoReviewers resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BranchPolicyAutoReviewersState, opts?: CustomResourceOptions): BranchPolicyAutoReviewers
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            blocking: Optional[bool] = None,
            enabled: Optional[bool] = None,
            project_id: Optional[str] = None,
            settings: Optional[BranchPolicyAutoReviewersSettingsArgs] = None) -> BranchPolicyAutoReviewers
    func GetBranchPolicyAutoReviewers(ctx *Context, name string, id IDInput, state *BranchPolicyAutoReviewersState, opts ...ResourceOption) (*BranchPolicyAutoReviewers, error)
    public static BranchPolicyAutoReviewers Get(string name, Input<string> id, BranchPolicyAutoReviewersState? state, CustomResourceOptions? opts = null)
    public static BranchPolicyAutoReviewers get(String name, Output<String> id, BranchPolicyAutoReviewersState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Blocking bool
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    ProjectId string
    The ID of the project in which the policy will be created.
    Settings Pulumi.AzureDevOps.Inputs.BranchPolicyAutoReviewersSettings
    Configuration for the policy. This block must be defined exactly once.
    Blocking bool
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    ProjectId string
    The ID of the project in which the policy will be created.
    Settings BranchPolicyAutoReviewersSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings BranchPolicyAutoReviewersSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking boolean
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId string
    The ID of the project in which the policy will be created.
    settings BranchPolicyAutoReviewersSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking bool
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    project_id str
    The ID of the project in which the policy will be created.
    settings BranchPolicyAutoReviewersSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. This relates to the Azure DevOps terms "optional" and "required" reviewers. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings Property Map
    Configuration for the policy. This block must be defined exactly once.

    Supporting Types

    BranchPolicyAutoReviewersSettings, BranchPolicyAutoReviewersSettingsArgs

    AutoReviewerIds List<string>
    Required reviewers ids. Supports multiples user Ids.
    Scopes List<Pulumi.AzureDevOps.Inputs.BranchPolicyAutoReviewersSettingsScope>
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    Message string
    Activity feed message, Message will appear in the activity feed of pull requests with automatically added reviewers.
    MinimumNumberOfReviewers int

    Minimum number of required reviewers. Defaults to 1.

    Note Has to be greater than 0. Can only be greater than 1 when attribute auto_reviewer_ids contains exactly one group! Only has an effect when attribute blocking is set to true.

    PathFilters List<string>
    Filter path(s) on which the policy is applied. Supports absolute paths, wildcards and multiple paths. Example: /WebApp/Models/Data.cs, /WebApp/* or *.cs,/WebApp/Models/Data.cs;ClientApp/Models/Data.cs.
    SubmitterCanVote bool
    Controls whether or not the submitter's vote counts. Defaults to false.
    AutoReviewerIds []string
    Required reviewers ids. Supports multiples user Ids.
    Scopes []BranchPolicyAutoReviewersSettingsScope
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    Message string
    Activity feed message, Message will appear in the activity feed of pull requests with automatically added reviewers.
    MinimumNumberOfReviewers int

    Minimum number of required reviewers. Defaults to 1.

    Note Has to be greater than 0. Can only be greater than 1 when attribute auto_reviewer_ids contains exactly one group! Only has an effect when attribute blocking is set to true.

    PathFilters []string
    Filter path(s) on which the policy is applied. Supports absolute paths, wildcards and multiple paths. Example: /WebApp/Models/Data.cs, /WebApp/* or *.cs,/WebApp/Models/Data.cs;ClientApp/Models/Data.cs.
    SubmitterCanVote bool
    Controls whether or not the submitter's vote counts. Defaults to false.
    autoReviewerIds List<String>
    Required reviewers ids. Supports multiples user Ids.
    scopes List<BranchPolicyAutoReviewersSettingsScope>
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    message String
    Activity feed message, Message will appear in the activity feed of pull requests with automatically added reviewers.
    minimumNumberOfReviewers Integer

    Minimum number of required reviewers. Defaults to 1.

    Note Has to be greater than 0. Can only be greater than 1 when attribute auto_reviewer_ids contains exactly one group! Only has an effect when attribute blocking is set to true.

    pathFilters List<String>
    Filter path(s) on which the policy is applied. Supports absolute paths, wildcards and multiple paths. Example: /WebApp/Models/Data.cs, /WebApp/* or *.cs,/WebApp/Models/Data.cs;ClientApp/Models/Data.cs.
    submitterCanVote Boolean
    Controls whether or not the submitter's vote counts. Defaults to false.
    autoReviewerIds string[]
    Required reviewers ids. Supports multiples user Ids.
    scopes BranchPolicyAutoReviewersSettingsScope[]
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    message string
    Activity feed message, Message will appear in the activity feed of pull requests with automatically added reviewers.
    minimumNumberOfReviewers number

    Minimum number of required reviewers. Defaults to 1.

    Note Has to be greater than 0. Can only be greater than 1 when attribute auto_reviewer_ids contains exactly one group! Only has an effect when attribute blocking is set to true.

    pathFilters string[]
    Filter path(s) on which the policy is applied. Supports absolute paths, wildcards and multiple paths. Example: /WebApp/Models/Data.cs, /WebApp/* or *.cs,/WebApp/Models/Data.cs;ClientApp/Models/Data.cs.
    submitterCanVote boolean
    Controls whether or not the submitter's vote counts. Defaults to false.
    auto_reviewer_ids Sequence[str]
    Required reviewers ids. Supports multiples user Ids.
    scopes Sequence[BranchPolicyAutoReviewersSettingsScope]
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    message str
    Activity feed message, Message will appear in the activity feed of pull requests with automatically added reviewers.
    minimum_number_of_reviewers int

    Minimum number of required reviewers. Defaults to 1.

    Note Has to be greater than 0. Can only be greater than 1 when attribute auto_reviewer_ids contains exactly one group! Only has an effect when attribute blocking is set to true.

    path_filters Sequence[str]
    Filter path(s) on which the policy is applied. Supports absolute paths, wildcards and multiple paths. Example: /WebApp/Models/Data.cs, /WebApp/* or *.cs,/WebApp/Models/Data.cs;ClientApp/Models/Data.cs.
    submitter_can_vote bool
    Controls whether or not the submitter's vote counts. Defaults to false.
    autoReviewerIds List<String>
    Required reviewers ids. Supports multiples user Ids.
    scopes List<Property Map>
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    message String
    Activity feed message, Message will appear in the activity feed of pull requests with automatically added reviewers.
    minimumNumberOfReviewers Number

    Minimum number of required reviewers. Defaults to 1.

    Note Has to be greater than 0. Can only be greater than 1 when attribute auto_reviewer_ids contains exactly one group! Only has an effect when attribute blocking is set to true.

    pathFilters List<String>
    Filter path(s) on which the policy is applied. Supports absolute paths, wildcards and multiple paths. Example: /WebApp/Models/Data.cs, /WebApp/* or *.cs,/WebApp/Models/Data.cs;ClientApp/Models/Data.cs.
    submitterCanVote Boolean
    Controls whether or not the submitter's vote counts. Defaults to false.

    BranchPolicyAutoReviewersSettingsScope, BranchPolicyAutoReviewersSettingsScopeArgs

    MatchType string
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    RepositoryId string
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    RepositoryRef string
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    MatchType string
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    RepositoryId string
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    RepositoryRef string
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    matchType String
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repositoryId String
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repositoryRef String
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    matchType string
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repositoryId string
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repositoryRef string
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    match_type str
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repository_id str
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repository_ref str
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    matchType String
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repositoryId String
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repositoryRef String
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.

    Import

    Azure DevOps Branch Policies can be imported using the project ID and policy configuration ID:

    $ pulumi import azuredevops:index/branchPolicyAutoReviewers:BranchPolicyAutoReviewers example 00000000-0000-0000-0000-000000000000/0
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi