From 30f4f886b5022816dce7d1144134dacd62702bb8 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 24 Jul 2024 17:39:12 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=A7=20(release.yml):=20update=20ch?= =?UTF-8?q?angelog=20configuration=20to=20reflect=20architecture=20improve?= =?UTF-8?q?ments=20=F0=9F=94=A7=20(main.yml):=20add=20WingetApplicationId?= =?UTF-8?q?=20to=20workflow=20for=20better=20deployment=20tracking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The changelog configuration now categorizes changes labeled as "architecture" under "Architecture Improvements" for better clarity. The workflow file is updated to include the WingetApplicationId, which helps in tracking and managing deployments via Winget. This ensures that the correct application ID is used based on the release ring, improving deployment accuracy and traceability. --- .github/release.yml | 6 +++--- .github/workflows/main.yml | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/release.yml b/.github/release.yml index dfc7dacf3..9d74c78da 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -7,7 +7,7 @@ changelog: - '*' exclude: labels: - - dependencies - - title: 👒 Dependencies + - architecture + - title: 👒 Architecture Improvements labels: - - dependencies + - architecture diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb71a8e9e..9205bf2f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: HasChanged_docs: ${{ steps.filter.outputs.docs }} HasChanged_automation: ${{ steps.filter.outputs.automation }} nkdAgility_Ring: ${{ steps.nkdagility.outputs.Ring }} + nkdAgility_WingetApplicationId: ${{ steps.nkdagility.outputs.WingetApplicationId }} nkdAgility_IsBuildEditBranch: ${{ steps.nkdagility.outputs.IsBuildEditBranch }} steps: - name: Checkout @@ -71,19 +72,25 @@ jobs: id: nkdagility run: | $Ring = "Canary" + $WingetApplicationId = "nkdagility.azure-devops-migration-tools" switch ($Env:GitVersion_PreReleaseLabel) { "" { $Ring = "Release"; + $WingetApplicationId = "nkdagility.azure-devops-migration-tools"; } "Preview" { $Ring = "Preview"; + $WingetApplicationId = "nkdagility.azure-devops-migration-tools.Preview"; } default { $Ring = "Canary"; + $WingetApplicationId = "nkdagility.azure-devops-migration-tools.Canary"; } } Write-Output "We are running for the $Ring Ring!" - echo "Ring=$Ring" >> $env:GITHUB_OUTPUT + Write-Output "We are focused on Winget ID $WingetApplicationId!" + echo "Ring=$Ring" >> $env:GITHUB_OUTPUT + echo "WingetApplicationId=$WingetApplicationId" >> $env:GITHUB_OUTPUT $IsBuildEditBranch = $false; if (("${{ github.ref_name }}").contains("build/")) { @@ -108,6 +115,7 @@ jobs: ### NKDAgility - nkdAgility_Ring: ${{needs.Setup.outputs.nkdAgility_Ring}} - nkdAgility_IsBuildEditBranch: ${{needs.Setup.outputs.nkdAgility_IsBuildEditBranch}} + - nkdAgility_WingetApplicationId: ${{needs.Setup.outputs.nkdAgility_WingetApplicationId}} ### GitVersion - GitVersion_BranchName: ${{needs.Setup.outputs.GitVersion_BranchName}} - GitVersion_SemVer: ${{needs.Setup.outputs.GitVersion_SemVer}} @@ -271,6 +279,7 @@ jobs: if ($Env:nkdAgility_Ring -ne 'Canary' && ($Env:HasChanged_src || $Env:HasChanged_docs )) { echo "discussion_category_name=Anouncement" >> $env:GITHUB_OUTPUT } + - name: Release uses: softprops/action-gh-release@v2 with: @@ -285,6 +294,18 @@ jobs: prerelease: ${{ needs.Setup.outputs.nkdAgility_Ring != 'Release' }} discussion_category_name: ${{ steps.release-options.outputs.discussion_category_name }} draft: ${{ needs.Setup.outputs.nkdAgility_Ring == 'Canary' }} + body: | + ## Azure DevOps Migration Tools v${{ needs.Setup.outputs.GitVersion_SemVer }} + Version: ${{ needs.Setup.outputs.GitVersion_SemVer }} + Ring: (${{ needs.Setup.outputs.nkdAgility_Ring }}) + + ## Get the tools + + - Download the [MigrationTools-${{ needs.Setup.outputs.GitVersion_SemVer }}.zip](https://github.com/nkdAgility/azure-devops-migration-tools/releases/download/v${{ needs.Setup.outputs.GitVersion_SemVer }}/MigrationTools-${{ needs.Setup.outputs.GitVersion_SemVer }}.zip) file below + - Install with Winget with `winget install ${{needs.Setup.outputs.nkdAgility_WingetApplicationId}} --version ${{ needs.Setup.outputs.GitVersion_SemVer }}` . There is a delay for aprovals on the winget store, so you may need to wait a few days before this is available. + - Install with Chocolatey with `choco install nkdagility.azure-devops-migration-tools --version ${{ needs.Setup.outputs.GitVersion_NuGetVersion }}`. There is a delay for aprovals on the chocolatey store, so you may need to wait a few hours before this is available. + + append_body: true # ElmahDeployment ElmahDeployemnt: From 8f1a852fc7d3fb1de53280e723b0b3fdd49e5a59 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 24 Jul 2024 17:56:43 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A7=20(labeler):=20add=20GitHub=20?= =?UTF-8?q?Actions=20labeler=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a labeler configuration to automate the labeling of pull requests. The `labeler.yml` file specifies rules for adding labels based on file changes: - Adds 'Documentation' label for changes within the 'docs' folder. - Adds 'build-action' label for changes within the 'build' directory and '.github/workflows' directory. The `workflows/labeler.yml` file sets up a GitHub Action to run the labeler on pull request events, ensuring that labels are automatically applied based on the defined rules. This improves the workflow by automating the labeling process, making it easier to categorize and manage pull requests. --- .github/labeler.yml | 10 ++++++++++ .github/workflows/labeler.yml | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..503256dc5 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,10 @@ +# Add 'Documentation' label to any changes within 'docs' folder or any subfolders +documentation: +- changed-files: + - any-glob-to-any-file: docs/** + +# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder +build-action: +- changed-files: + - any-glob-to-any-file: 'build/**' + - any-glob-to-any-file: '.github/workflows/**' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..f25102135 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + sync-labels: true \ No newline at end of file From 25291a74f7ae953634e5ee46602e5f091e6a6a5c Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 24 Jul 2024 18:03:03 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A7=20(labeler.yml):=20update=20la?= =?UTF-8?q?beler=20configuration=20to=20add=20new=20labels=20based=20on=20?= =?UTF-8?q?branch=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add new rules to automatically label PRs based on branch names. This helps in categorizing PRs more efficiently and ensures that the correct labels are applied without manual intervention. The new rules include: - Adding a 'feature' label for branches starting with or containing 'feature' or 'topic'. - Adding a 'bug' label for branches starting with or containing 'fix' or 'bug'. --- .github/labeler.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 503256dc5..2b4be7370 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -8,3 +8,15 @@ build-action: - changed-files: - any-glob-to-any-file: 'build/**' - any-glob-to-any-file: '.github/workflows/**' +- head-branch: ['^build', 'build'] + + +# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name +feature: +- head-branch: ['^feature', 'feature', '^topic', 'topic'] + +# Add 'bug' label to any PR +bug: +- head-branch: ['^fix', 'fix','^bug', 'bug'] + + From 2541991e30f81a2944ffc5f0efc0c8dd21901a27 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 24 Jul 2024 18:11:27 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=94=A7=20(labeler.yml):=20update=20la?= =?UTF-8?q?beler=20configuration=20to=20improve=20file=20matching=20and=20?= =?UTF-8?q?add=20new=20labels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combine multiple globs into arrays for 'build-action' to simplify configuration. Add new labels 'enhancement', 'enhancement-classic', and 'enhancement-modern' to better categorize changes in the 'src' directory. This improves the granularity and accuracy of automated labeling for pull requests, making it easier to manage and review changes. --- .github/labeler.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 2b4be7370..2b3b4c4a7 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -6,10 +6,21 @@ documentation: # Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder build-action: - changed-files: - - any-glob-to-any-file: 'build/**' - - any-glob-to-any-file: '.github/workflows/**' + - any-glob-to-any-file: ['build/**', '.github/workflows/**'] - head-branch: ['^build', 'build'] - + +enhancement: +- changed-files: + - any-glob-to-any-file: ['src/**'] + +enhancement-classic: +- changed-files: + - any-glob-to-any-file: ['src/MigrationTools/_EngineV1/**', 'src/VstsSyncMigrator*/**'] + +enhancement-modern: +- changed-files: + - any-glob-to-any-file: ['src/**'] + - all-globs-to-all-files: ['!src/MigrationTools/_EngineV1/**', '!src/VstsSyncMigrator*/**'] # Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name feature: From a885a2395a98009417638a2691d7da9c62644b2d Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 24 Jul 2024 18:14:10 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=94=A7=20(workflows):=20update=20work?= =?UTF-8?q?flow=20names=20for=20consistency=20and=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the names of GitHub workflows to include "OpenAI" for better branding and consistency. This change makes it clear that these workflows are related to OpenAI, improving the overall organization and readability of the workflow files. --- .github/workflows/code-review.yml | 2 +- .github/workflows/open-pr-describer.yml | 2 +- .github/workflows/opencommit.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 9bba61e62..57b2be78e 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -1,4 +1,4 @@ -name: Code Review +name: OpenAI - Code Review permissions: contents: read diff --git a/.github/workflows/open-pr-describer.yml b/.github/workflows/open-pr-describer.yml index 5e5fa4e65..48c2fbc27 100644 --- a/.github/workflows/open-pr-describer.yml +++ b/.github/workflows/open-pr-describer.yml @@ -1,4 +1,4 @@ -name: OpenAI PR Description Generator +name: "OpenAI - PR Description Generator" on: pull_request: diff --git a/.github/workflows/opencommit.yml b/.github/workflows/opencommit.yml index 5d015abac..b16dd7535 100644 --- a/.github/workflows/opencommit.yml +++ b/.github/workflows/opencommit.yml @@ -1,4 +1,4 @@ -name: 'OpenCommit AI' +name: 'OpenAI - OpenCommit AI' permissions: contents: write