This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization, | |
| [string]$Connstr | |
| ) | |
| $base64Token = [System.Convert]::ToBase64String([char[]]$PAT) | |
| $headers = @{Authorization = 'Basic {0}' -f $base64Token}; | |
| $UriOrganization = "https://api.github.com/orgs/$($organization)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE [dbo].[ProjectsPickLists]( | |
| [TeamProjectId] [VARCHAR](40) NOT NULL, | |
| [TeamProjectName] [VARCHAR](200) NOT NULL, | |
| [FieldName] [VARCHAR](100) NOT NULL, | |
| [FieldReferenceName] [VARCHAR](100) NOT NULL, | |
| [FieldType] [VARCHAR](30) NOT NULL, | |
| [FieldPickListId] [VARCHAR](40) NOT NULL, | |
| [FieldPickListItems] NVARCHAR(MAX) NOT NULL | |
| ) | |
| GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization, | |
| [string]$Connstr | |
| ) | |
| $SQLQuery = "TRUNCATE TABLE ProjectsPickLists" | |
| Invoke-Sqlcmd -query $SQLQuery -ConnectionString $Connstr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization | |
| ) | |
| #connect Azure DevOps | |
| echo $PAT | az devops login --org $Organization | |
| az devops configure --defaults organization=$Organization | |
| #Read File |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE [dbo].[Projects]( | |
| [TeamProjectId] VARCHAR(100) NOT NULL, | |
| [TeamProjectName] VARCHAR(100) NOT NULL, | |
| CONSTRAINT [PK_Projects] PRIMARY KEY CLUSTERED | |
| ( | |
| [TeamProjectId] ASC | |
| )WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] | |
| ) ON [PRIMARY] | |
| GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization, | |
| [string]$Connstr | |
| ) | |
| $SQLQuery = "DELETE FROM RepositoriesAheadBehind" | |
| Invoke-Sqlcmd -query $SQLQuery -ConnectionString $Connstr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE [dbo].[ProcessesWorkItemsRules]( | |
| [ProcessName] [varchar](100) NULL, | |
| [ProcessWorkItemTypeName] [varchar](100) NULL, | |
| [ProcessWorkItemTypeRuleName] [varchar](100) NULL, | |
| [ProcessWorkItemTypeRuleConditionsTypes] [nvarchar](MAX) NULL, | |
| [ProcessWorkItemTypeRuleConditionsFields] [nvarchar](MAX) NULL, | |
| [ProcessWorkItemTypeRuleConditionsValues] [nvarchar](MAX) NULL, | |
| [ProcessWorkItemTypeRuleActionsTypes] [nvarchar](MAX) NULL, | |
| [ProcessWorkItemTypeRuleActionsTargetFields] [nvarchar](MAX) NULL, | |
| [ProcessWorkItemTypeRuleActionsValues] [nvarchar](MAX) NULL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization, | |
| [string]$Connstr | |
| ) | |
| $SQLQuery = "TRUNCATE TABLE ProcessesWorkItemsRules" | |
| Invoke-Sqlcmd -query $SQLQuery -ConnectionString $Connstr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE [dbo].[LatestReleases]( | |
| [TeamProjectName] [varchar](100) NULL, | |
| [ReleaseDefinitionId] [varchar](40) NULL, | |
| [ReleaseDefinitionName] [varchar](150) NULL, | |
| [ReleaseNumber] [varchar](100) NULL, | |
| [ReleaseCreatedOn] [datetime] NULL, | |
| [ReleaseLink] [nvarchar](MAX) NULL, | |
| [ReleaseEnvironmentName] [varchar](150) NULL, | |
| [ReleaseEnvironmentResult] [varchar](50) NULL, | |
| [ReleaseEnvironmentReason] [varchar](50) NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param | |
| ( | |
| [string]$PAT, | |
| [string]$Organization, | |
| [string]$Connstr | |
| ) | |
| $SQLQuery = "TRUNCATE TABLE LatestReleases" | |
| Invoke-Sqlcmd -query $SQLQuery -ConnectionString $Connstr |