Skip to content

Commit 81660d9

Browse files
authored
add lastCommitId to New-AzureSynapseGitRepositoryConfig (#18935)
1 parent d29926e commit 81660d9

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

src/Synapse/Synapse/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added LastCommitId parameter to `New-AzureSynapseGitRepositoryConfig`
2223
* Fixed the issue that update spark pool version fail by `Update-AzSynapseSparkPool`
2324

2425
## Version 1.4.0

src/Synapse/Synapse/Commands/ManagementCommands/Workspace/NewAzureSynapseGitRepositoryConfig.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public class NewAzureSynapseGitRepositoryConfig : SynapseManagementCmdletBase
5959
[ValidateNotNullOrEmpty]
6060
public Guid TenantId { get; set; }
6161

62+
[Parameter(Mandatory = false, HelpMessage = HelpMessages.LastCommitId)]
63+
[ValidateNotNullOrEmpty]
64+
public string LastCommitId { get; set; }
65+
6266
public override void ExecuteCmdlet()
6367
{
6468
if (this.RepositoryType == SynapseConstants.RepositoryType.AzureDevOpsGit && this.ProjectName == null)
@@ -83,6 +87,7 @@ public override void ExecuteCmdlet()
8387
RepositoryName = this.RepositoryName,
8488
CollaborationBranch = this.CollaborationBranch,
8589
TenantId = this.TenantId,
90+
LastCommitId = this.LastCommitId,
8691
RootFolder = this.RootFolder
8792
};
8893

src/Synapse/Synapse/Common/HelpMessages.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static class HelpMessages
6464

6565
public const string TenantId = "Select the tenant Id to use when signing in into the Azure DevOps Git repository.";
6666

67+
public const string LastCommitId = "The last published commit Id.";
68+
6769
public const string DoNotAssignManagedIdentity = "Do not assign the workspace's system-assigned managed identity CONTROL permissions to SQL pools for pipeline integration.";
6870

6971
public const string SparkPoolName = "Name of Synapse Spark pool.";

src/Synapse/Synapse/Models/ManagementModels/Workspace/PSWorkspaceRepositoryConfiguration.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public WorkspaceRepositoryConfiguration ToSdkObject()
9090
ProjectName = this.ProjectName,
9191
RepositoryName = this.RepositoryName,
9292
CollaborationBranch = this.CollaborationBranch,
93-
RootFolder = this.RootFolder
93+
RootFolder = this.RootFolder,
94+
LastCommitId = this.LastCommitId
9495
};
9596
}
9697
}

src/Synapse/Synapse/help/New-AzSynapseGitRepositoryConfig.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Creates Git repository configuration.
1515
```
1616
New-AzSynapseGitRepositoryConfig -RepositoryType <String> [-HostName <String>] -AccountName <String>
1717
[-ProjectName <String>] -RepositoryName <String> -CollaborationBranch <String> [-RootFolder <String>]
18-
[-TenantId <Guid>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
18+
[-TenantId <Guid>] [-LastCommitId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -96,6 +96,21 @@ Accept pipeline input: False
9696
Accept wildcard characters: False
9797
```
9898

99+
### -LastCommitId
100+
The last published commit Id.
101+
102+
```yaml
103+
Type: System.String
104+
Parameter Sets: (All)
105+
Aliases:
106+
107+
Required: False
108+
Position: Named
109+
Default value: None
110+
Accept pipeline input: False
111+
Accept wildcard characters: False
112+
```
113+
99114
### -ProjectName
100115
The project name you are connecting, only specify it when you choose DevOps.
101116

0 commit comments

Comments
 (0)