Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build/trytogetrestdone #2182

Merged
merged 60 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b13e621
Create Elmah.io Deployment
MrHinsh Jul 16, 2024
8ad1c85
Updsate
MrHinsh Jul 16, 2024
b353029
Merge branch 'main' into build/trytogetrestdone
MrHinsh Jul 16, 2024
2b18e9e
Update
MrHinsh Jul 16, 2024
0aea6d4
Update with summery
MrHinsh Jul 16, 2024
4caaeab
Update
MrHinsh Jul 16, 2024
dba71e7
Update
MrHinsh Jul 16, 2024
c3ea828
Update again
MrHinsh Jul 16, 2024
26b99bc
Update
MrHinsh Jul 16, 2024
0167b79
Update
MrHinsh Jul 16, 2024
6855e93
Update with ) and @ ficed
MrHinsh Jul 16, 2024
4ba3008
Push to $GITHUB_STEP_SUMMARY
MrHinsh Jul 16, 2024
88d0004
Up do $Env:GITHUB_STEP_SUMMARY
MrHinsh Jul 16, 2024
9cb4d1b
Updarte for better Summery
MrHinsh Jul 16, 2024
aabc691
Add nkdAgility_IsBuildEdit
MrHinsh Jul 16, 2024
d5890e6
Update with new method of detecting a build edit
MrHinsh Jul 16, 2024
8af53e5
Update to
MrHinsh Jul 16, 2024
6d27cab
Update relase catagory
MrHinsh Jul 16, 2024
96a97bb
Test release
MrHinsh Jul 16, 2024
d92d6b9
Update packageExtension build nuber
MrHinsh Jul 16, 2024
25f4dc9
Update with marektplace deploy
MrHinsh Jul 16, 2024
fe65355
Update
MrHinsh Jul 16, 2024
eae841b
Update docs release as well
MrHinsh Jul 16, 2024
0c5d9ed
Update to fix typo
MrHinsh Jul 16, 2024
8e8e122
Update
MrHinsh Jul 16, 2024
4ef6a0e
Update 4
MrHinsh Jul 16, 2024
611fe72
Update for winget run
MrHinsh Jul 16, 2024
64fa3bc
Update to run more
MrHinsh Jul 16, 2024
42cca8c
Update password
MrHinsh Jul 16, 2024
5ce114b
update with new build bits
MrHinsh Jul 16, 2024
34c59a6
Update
MrHinsh Jul 16, 2024
d86ada2
Added checkout.. should probably package build scripts
MrHinsh Jul 16, 2024
404c67a
Fices $IsBuildEditBranch
MrHinsh Jul 16, 2024
a87b035
Update release
MrHinsh Jul 16, 2024
015f7ab
Full update should be there
MrHinsh Jul 16, 2024
476ea65
Added powershell snafus
MrHinsh Jul 16, 2024
c8138a6
Updarte
MrHinsh Jul 16, 2024
64ac822
Remove spaces
MrHinsh Jul 16, 2024
f240e47
ypdate
MrHinsh Jul 16, 2024
11c8fc6
Update choco to windeos
MrHinsh Jul 16, 2024
5a679e4
Update with defaults
MrHinsh Jul 16, 2024
6be81b3
Add source for choco
MrHinsh Jul 16, 2024
d38c706
Add openai for fun
MrHinsh Jul 16, 2024
d590ee0
Update
MrHinsh Jul 16, 2024
a9c28a8
Add new commit updater OpenCommit
MrHinsh Jul 16, 2024
7554bc4
Upodate solution
MrHinsh Jul 16, 2024
89d0f42
Ignore some stuff
MrHinsh Jul 16, 2024
4576b1d
Update ai
MrHinsh Jul 16, 2024
14212ed
Allow manual creation
MrHinsh Jul 16, 2024
1197ea4
Try ghe other model
MrHinsh Jul 16, 2024
8d58747
Use 3.5
MrHinsh Jul 16, 2024
119abcb
Update t get code review working
MrHinsh Jul 16, 2024
add78d8
Update with ne wpermsisions
MrHinsh Jul 16, 2024
1a534aa
Update with buold token
MrHinsh Jul 16, 2024
d0d0945
Create ne file for code recire
MrHinsh Jul 16, 2024
8e5cf7d
Deactivate code review
MrHinsh Jul 16, 2024
0ee7047
Update permissions
MrHinsh Jul 16, 2024
9369d89
Update
MrHinsh Jul 16, 2024
7cb60e7
Update
MrHinsh Jul 16, 2024
dce9fd1
Updated to app token
MrHinsh Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Code Review

permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [opened, reopened]

jobs:
code-review:
runs-on: ubuntu-latest
steps:
- uses: fitomad/github-chatgpt-integration@main
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
github-token: ${{ secrets.GH_TOKEN }}
github-pr-id: ${{ github.event.number }}
dev-lang: c#
openai-max-tokens: 4096
245 changes: 173 additions & 72 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions .github/workflows/opencommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'OpenCommit AI'

permissions:
contents: write
pull-requests: write

on:
push:
# this list of branches is often enough,
# but you may still ignore other public branches
branches-ignore: [main master dev development release]
workflow_dispatch:

jobs:
opencommit:
timeout-minutes: 10
name: OpenCommit
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Setup Node.js Environment
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: di-sukharev/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
# set openAI api key in repo actions secrets,
# for openAI keys go to: https://platform.openai.com/account/api-keys
# for repo secret go to: <your_repo_url>/settings/secrets/actions
OCO_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

# customization
OCO_TOKENS_MAX_INPUT: 1100
OCO_TOKENS_MAX_OUTPUT: 500
OCO_OPENAI_BASE_PATH: ''
OCO_DESCRIPTION: false
OCO_EMOJI: false
OCO_MODEL: gpt-4
OCO_LANGUAGE: en
OCO_PROMPT_MODULE: conventional-commit
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
stale-pr-label: 'no-pr-activity'
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days'
stale-pr-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days'
days-before-stale: 30
days-before-close: 10
days-before-stale: 90
days-before-close: 30
exempt-issue-label: 'enhancement'
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDelivery
continuous-delivery-fallback-tag: ''
continuous-delivery-fallback-tag: 'Canary'
next-version: 15.0.1
branches:
main:
Expand Down
4 changes: 4 additions & 0 deletions MigrationTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MigrationTools.TestExtensio
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".workflows", ".workflows", "{8A70932A-F6C7-45D1-8E72-608B6BF0F9FD}"
ProjectSection(SolutionItems) = preProject
.github\workflows\code-review.yml = .github\workflows\code-review.yml
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\opencommit.yml = .github\workflows\opencommit.yml
.github\workflows\stale.yml = .github\workflows\stale.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MigrationTools.ConsoleDataGenerator", "src\MigrationTools.ConsoleDataGenerator\MigrationTools.ConsoleDataGenerator.csproj", "{6A259EA6-860B-448A-8943-594DC1A15105}"
Expand All @@ -113,6 +116,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{88C358
build\packageExtension.ps1 = build\packageExtension.ps1
build\packageNuget.ps1 = build\packageNuget.ps1
build\packageWinget.ps1 = build\packageWinget.ps1
build\releaseExtension.ps1 = build\releaseExtension.ps1
build\releaseGitHubRelease.ps1 = build\releaseGitHubRelease.ps1
build\releaseWingetPackage.ps1 = build\releaseWingetPackage.ps1
build\versioning.ps1 = build\versioning.ps1
Expand Down
7 changes: 5 additions & 2 deletions build/azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ stages:
version: v0.7.x
- task: ms-devlabs.vsts-developer-tools-build-tasks.publish-extension-build-task.PublishAzureDevOpsExtension@4
displayName: 'Publish Extension'
condition: and(succeeded(), ne(variables['nkdAgility_Ring'], "Canary"))
inputs:
connectedServiceName: 'nkdAgility-Marketplace'
fileType: vsix
Expand Down Expand Up @@ -518,6 +519,7 @@ stages:
downloadPath: '$(System.ArtifactsDirectory)'
- task: NuGetCommand@2
displayName: 'NuGet push'
condition: and(succeeded(), ne(variables['nkdAgility_Ring'], "Canary"))
inputs:
command: push
packagesToPush: '$(System.ArtifactsDirectory)\**\*vsts-sync-migrator.*.nupkg'
Expand Down Expand Up @@ -550,9 +552,10 @@ stages:
downloadPath: '$(System.ArtifactsDirectory)'
- task: PowerShell@2
displayName: Create Winget Release
condition: and(succeeded(), ne(variables['nkdAgility_Ring'], "Canary"))
inputs:
filePath: 'build/releaseWingetPackage.ps1'
arguments: '-version $(GitVersion.SemVer) -releaseTag $(releaseTag) -GH_TOKEN $(GH_TOKEN)'
arguments: '-version $(GitVersion.SemVer) -ring $(nkdAgility_Ring) -GH_TOKEN $(GH_TOKEN)'

# Documentation release Stage
- stage: DocsReleaseStage
Expand Down Expand Up @@ -603,7 +606,7 @@ stages:
Write-Host "Remote Path: $remoteDirectory"
Write-Host "##vso[task.setvariable variable=remoteDirectory;isOutput=true]$remoteDirectory"
- task: CopyFilesOverSSH@0
condition: and(succeeded(), ne(dependencies.SetupStage.outputs['ConfigJob.VersionOut.nkdAgility_Ring'], "Canary"))
condition: and(succeeded(), ne(variables['nkdAgility_Ring'], "Canary"))
inputs:
sshEndpoint: 'nakedalmweb-learn'
sourceFolder: '$(System.ArtifactsDirectory)/site'
Expand Down
30 changes: 30 additions & 0 deletions build/releaseExtension.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<#
Script description.

Some notes.
#>
param (
# name of the output folder
[Parameter(Mandatory=$true)]
[string]$vsixFile,
[Parameter(Mandatory=$true)]
[string]$marketplaceToken
)
Write-Output "Azure DevOps Migration Tools (Extension) Release"
Write-Output "----------------------------------------"
Write-Output "Extension file: $extensionFile"
Write-Output "----------------------------------------"
if (((npm list -g tfx-cli) -join "," ).Contains("empty")) {
Write-Output "Installing tfx-cli"
npm i -g tfx-cli
} else { Write-Output "Detected tfx-cli"}
Write-Output "----------------------------------------"
# Login
Write-Output ">>>>> Login"
tfx login --service-url https://marketplace.visualstudio.com --token $marketplaceToken
Write-Output "----------------------------------------"
Write-Output "----------------------------------------"
# Build TFS Extension
Write-Output ">>>>> Send TFS Extension"
tfx extension publish --vsix "$vsixFile" --token $marketplaceToken
Write-Output "----------------------------------------"
22 changes: 15 additions & 7 deletions build/releaseWingetPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ param (

# name of the releaseTag
[Parameter(Mandatory=$true)]
[string]$releaseTag,
[string]$ring,

# GH_TOKEN
[Parameter(Mandatory=$true)]
Expand All @@ -33,13 +33,21 @@ Write-Host $"##[warning] $installURL"

$wigetPackageId = "nkdAgility.AzureDevOpsMigrationTools"

if ($releaseTag -eq "Preview")
{
$wigetPackageId = "$wigetPackageId.Preview"
}
Write-Host "Winget Create with $wigetPackageId"

./wingetcreate.exe update --submit --token $GH_TOKEN --urls $installURL --version $version $wigetPackageId
switch ($ring) {
"Preview" {
$wigetPackageId = "$wigetPackageId.Preview"
./wingetcreate.exe update --submit --token $GH_TOKEN --urls $installURL --version $version $wigetPackageId
}
"Release" {
$wigetPackageId = "nkdAgility.AzureDevOpsMigrationTools"
./wingetcreate.exe update --submit --token $GH_TOKEN --urls $installURL --version $version $wigetPackageId
}
default {
$wigetPackageId = "nkdAgility.AzureDevOpsMigrationTools.Canary"
Write-Host "We dont ship canary builds!"
}
}

Write-Host "Deployed : $wigetPackageId"

Expand Down
Loading