[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-19 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eRepoSource\u003c/code\u003e class within the Cloud Build v1 API is 2.15.0, with multiple previous versions available, ranging down to version 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRepoSource\u003c/code\u003e is a class used to specify the location of source code within a Google Cloud Source Repository, implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides properties such as \u003ccode\u003eBranchName\u003c/code\u003e, \u003ccode\u003eCommitSha\u003c/code\u003e, and \u003ccode\u003eTagName\u003c/code\u003e to define which branch, commit, or tag should be used for a build, and also allows for specifying a relative directory via \u003ccode\u003eDir\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRepoSource\u003c/code\u003e object also contains information regarding the project ID of the Cloud Source Repository, as well as the name of the repository.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSubstitutions\u003c/code\u003e property can be used in a triggered build to perform string substitution, should it be needed.\u003c/p\u003e\n"]]],[],null,["# Cloud Build v1 API - Class RepoSource (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.15.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.14.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.13.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.12.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.11.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.10.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.9.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.8.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.7.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.6.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.5.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.4.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.3.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.2.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.1.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.0.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.4.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.3.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.2.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.1.0/Google.Cloud.CloudBuild.V1.RepoSource)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.0.0/Google.Cloud.CloudBuild.V1.RepoSource) \n\n public sealed class RepoSource : IMessage\u003cRepoSource\u003e, IEquatable\u003cRepoSource\u003e, IDeepCloneable\u003cRepoSource\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Build v1 API class RepoSource.\n\nLocation of the source in a Google Cloud Source Repository. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RepoSource \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RepoSource](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.RepoSource), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RepoSource](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.RepoSource), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RepoSource](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.RepoSource), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.CloudBuild.V1](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudBuild.V1.dll\n\nConstructors\n------------\n\n### RepoSource()\n\n public RepoSource()\n\n### RepoSource(RepoSource)\n\n public RepoSource(RepoSource other)\n\nProperties\n----------\n\n### BranchName\n\n public string BranchName { get; set; }\n\nRegex matching branches to build.\n\nThe syntax of the regular expressions accepted is the syntax accepted by\nRE2 and described at \u003chttps://github.com/google/re2/wiki/Syntax\u003e\n\n### CommitSha\n\n public string CommitSha { get; set; }\n\nExplicit commit SHA to build.\n\n### Dir\n\n public string Dir { get; set; }\n\nDirectory, relative to the source root, in which to run the build.\n\nThis must be a relative path. If a step's `dir` is specified and is an\nabsolute path, this value is ignored for that step's execution.\n\n### HasBranchName\n\n public bool HasBranchName { get; }\n\nGets whether the \"branch_name\" field is set\n\n### HasCommitSha\n\n public bool HasCommitSha { get; }\n\nGets whether the \"commit_sha\" field is set\n\n### HasTagName\n\n public bool HasTagName { get; }\n\nGets whether the \"tag_name\" field is set\n\n### InvertRegex\n\n public bool InvertRegex { get; set; }\n\nOnly trigger a build if the revision regex does NOT match the revision\nregex.\n\n### ProjectId\n\n public string ProjectId { get; set; }\n\nID of the project that owns the Cloud Source Repository. If omitted, the\nproject ID requesting the build is assumed.\n\n### RepoName\n\n public string RepoName { get; set; }\n\nName of the Cloud Source Repository.\n\n### RevisionCase\n\n public RepoSource.RevisionOneofCase RevisionCase { get; }\n\n### Substitutions\n\n public MapField\u003cstring, string\u003e Substitutions { get; }\n\nSubstitutions to use in a triggered build.\nShould only be used with RunBuildTrigger\n\n### TagName\n\n public string TagName { get; set; }\n\nRegex matching tags to build.\n\nThe syntax of the regular expressions accepted is the syntax accepted by\nRE2 and described at \u003chttps://github.com/google/re2/wiki/Syntax\u003e"]]