From 011ddef2f0a98fc5669b5b76f011822af033677c Mon Sep 17 00:00:00 2001 From: j82w Date: Mon, 30 Mar 2020 05:58:01 -0700 Subject: [PATCH 01/14] Updating PR template with PR title as changelog To reduce conflicts and changelog mistakes the PR titles will be used as the changelog in the future. This will make is easier for users looking through the history and avoid merge conflicts on the changelog file. This will require the changelog to get generated for each release, but can be done as part of contract validation. --- PULL_REQUEST_TEMPLATE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index fc8637cf6b..0474445aa2 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,21 @@ # Pull Request Template +## Pull Request Title +1. Changelog will be generated from PR titles. +2. PR titles will be formatted with the following layout. + 1. Internal is optional and represent changes with no public facing changes such as test only changes + 2. Category represent the area of the change like batch, changefeed, point operation, or query + 3. Added or Fixed identifies if a new feature is being added or if a bug is being fixed + 4. Description is a user friendly explanation of the change + +### Format +`[Internal](Added/Fixed)(Category)(Description)` + +### Example +Added Diagnostics GetElapsedClientLatency to CosmosDiagnostics +Fixed PartitionKey null reference when using default(PartitionKey) +Internal added query code generator for CosmosNumbers for easy additions in the future. + ## Description Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. From 493c78abf8460fd471e6e4ab2b9e22ba9766f9fc Mon Sep 17 00:00:00 2001 From: j82w Date: Wed, 1 Apr 2020 06:41:53 -0700 Subject: [PATCH 02/14] Updated based on feedback --- PULL_REQUEST_TEMPLATE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 0474445aa2..8fc6fc32a6 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -9,12 +9,12 @@ 4. Description is a user friendly explanation of the change ### Format -`[Internal](Added/Fixed)(Category)(Description)` +`[Internal](Added/Fixed)(Category):(Description)` ### Example -Added Diagnostics GetElapsedClientLatency to CosmosDiagnostics -Fixed PartitionKey null reference when using default(PartitionKey) -Internal added query code generator for CosmosNumbers for easy additions in the future. +Added Diagnostics: GetElapsedClientLatency to CosmosDiagnostics +Fixed PartitionKey: null reference when using default(PartitionKey) +[Internal] Added Query: code generator for CosmosNumbers for easy additions in the future. ## Description From 1a5f2cccb57042560e69a1f0ad735e1df53f7717 Mon Sep 17 00:00:00 2001 From: j82w Date: Wed, 1 Apr 2020 07:00:31 -0700 Subject: [PATCH 03/14] Fixed grammar --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 8fc6fc32a6..97ce8ba4d3 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ 1. Changelog will be generated from PR titles. 2. PR titles will be formatted with the following layout. 1. Internal is optional and represent changes with no public facing changes such as test only changes - 2. Category represent the area of the change like batch, changefeed, point operation, or query + 2. Category represents the area of the change like batch, changefeed, point operation, or query 3. Added or Fixed identifies if a new feature is being added or if a bug is being fixed 4. Description is a user friendly explanation of the change From 643dd97d805aea65c3215949dfefc97896633e38 Mon Sep 17 00:00:00 2001 From: j82w Date: Wed, 1 Apr 2020 07:01:20 -0700 Subject: [PATCH 04/14] More fixes --- PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 97ce8ba4d3..62d0655d5b 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,7 @@ ## Pull Request Title 1. Changelog will be generated from PR titles. 2. PR titles will be formatted with the following layout. - 1. Internal is optional and represent changes with no public facing changes such as test only changes + 1. Internal is optional and represents changes with no public facing changes such as test only changes 2. Category represents the area of the change like batch, changefeed, point operation, or query 3. Added or Fixed identifies if a new feature is being added or if a bug is being fixed 4. Description is a user friendly explanation of the change From 10d5a4c32d2860088f4914242615fc6579a69623 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 1 Apr 2020 07:40:22 -0700 Subject: [PATCH 05/14] Adding pr lint action --- .github/workflows/prlint.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/prlint.yml diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml new file mode 100644 index 0000000000..d984352ae0 --- /dev/null +++ b/.github/workflows/prlint.yml @@ -0,0 +1,15 @@ +name: PR Lint + +on: + pull_request: + types: [opened, edited, reopened] + +jobs: + pr-lint: + runs-on: ubuntu-latest + steps: + - uses: morrisoncole/pr-lint-action@v1.0.0 + with: + title-regex: "(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+" + on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" + repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From 52474af017577e0c05ed4836ad5c4ab326b51ad5 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 1 Apr 2020 07:47:02 -0700 Subject: [PATCH 06/14] Try single quotes to fix parse error --- .github/workflows/prlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml index d984352ae0..aa9b8dc3c9 100644 --- a/.github/workflows/prlint.yml +++ b/.github/workflows/prlint.yml @@ -10,6 +10,6 @@ jobs: steps: - uses: morrisoncole/pr-lint-action@v1.0.0 with: - title-regex: "(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+" + title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From 3a201d364102be83fcfb76a5734ef39ab93a13e1 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 1 Apr 2020 13:53:23 -0700 Subject: [PATCH 07/14] Trying to move it to build yaml --- .github/workflows/prlint.yml | 15 --------------- templates/build-test.yml | 6 ++++++ 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/prlint.yml diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml deleted file mode 100644 index aa9b8dc3c9..0000000000 --- a/.github/workflows/prlint.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PR Lint - -on: - pull_request: - types: [opened, edited, reopened] - -jobs: - pr-lint: - runs-on: ubuntu-latest - steps: - - uses: morrisoncole/pr-lint-action@v1.0.0 - with: - title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' - on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" - repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/templates/build-test.yml b/templates/build-test.yml index 815143416f..d2298fd712 100644 --- a/templates/build-test.yml +++ b/templates/build-test.yml @@ -12,6 +12,12 @@ jobs: pool: vmImage: ${{ parameters.VmImage }} + steps: + - uses: morrisoncole/pr-lint-action@v1.0.0 + with: + title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' + on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" + steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching From 266e405e6d7735434b83b985b279506ed61e7782 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 1 Apr 2020 13:55:49 -0700 Subject: [PATCH 08/14] Try including all changes --- azure-pipelines.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9849e470df..fa74ff394f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,8 +8,7 @@ pr: - releases/* paths: include: - - Microsoft.Azure.Cosmos/* - - NuGet.config + - /* variables: DebugArguments: ' --filter "TestCategory!=Quarantine & TestCategory!=Functional" --verbosity normal ' @@ -22,7 +21,7 @@ jobs: parameters: BuildConfiguration: Release VmImage: $(VmImage) - + #- template: templates/build-test.yml # parameters: From 57465c90949b417b62e04d19c8e7beb95f69627d Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 1 Apr 2020 13:59:04 -0700 Subject: [PATCH 09/14] Updating --- templates/build-test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/build-test.yml b/templates/build-test.yml index d2298fd712..b4729ca900 100644 --- a/templates/build-test.yml +++ b/templates/build-test.yml @@ -8,9 +8,7 @@ parameters: jobs: - job: - displayName: Tests ${{ parameters.BuildConfiguration }} - pool: - vmImage: ${{ parameters.VmImage }} + displayName: Tests PRLint steps: - uses: morrisoncole/pr-lint-action@v1.0.0 @@ -18,6 +16,11 @@ jobs: title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" +- job: + displayName: Tests ${{ parameters.BuildConfiguration }} + pool: + vmImage: ${{ parameters.VmImage }} + steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching From 5239ea0ac7f2bbec227ae478a754235aba38ac80 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 1 Apr 2020 14:03:32 -0700 Subject: [PATCH 10/14] Reverting changes --- .github/workflows/prlint.yml | 15 +++++++++++++++ templates/build-test.yml | 9 --------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/prlint.yml diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml new file mode 100644 index 0000000000..aa9b8dc3c9 --- /dev/null +++ b/.github/workflows/prlint.yml @@ -0,0 +1,15 @@ +name: PR Lint + +on: + pull_request: + types: [opened, edited, reopened] + +jobs: + pr-lint: + runs-on: ubuntu-latest + steps: + - uses: morrisoncole/pr-lint-action@v1.0.0 + with: + title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' + on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" + repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/templates/build-test.yml b/templates/build-test.yml index b4729ca900..815143416f 100644 --- a/templates/build-test.yml +++ b/templates/build-test.yml @@ -7,15 +7,6 @@ parameters: OS: 'Windows' jobs: -- job: - displayName: Tests PRLint - - steps: - - uses: morrisoncole/pr-lint-action@v1.0.0 - with: - title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' - on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" - - job: displayName: Tests ${{ parameters.BuildConfiguration }} pool: From 80f7766f81aea2f99b48e29621622119ff7fdb94 Mon Sep 17 00:00:00 2001 From: j82w Date: Thu, 2 Apr 2020 16:41:03 -0700 Subject: [PATCH 11/14] updated based on feedback --- PULL_REQUEST_TEMPLATE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 62d0655d5b..e3c1cd8578 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -4,16 +4,16 @@ 1. Changelog will be generated from PR titles. 2. PR titles will be formatted with the following layout. 1. Internal is optional and represents changes with no public facing changes such as test only changes - 2. Category represents the area of the change like batch, changefeed, point operation, or query - 3. Added or Fixed identifies if a new feature is being added or if a bug is being fixed + 2. Added or Fixed identifies if a new feature is being added or if a bug is being fixed + 3. Category represents the area of the change like batch, changefeed, point operation, or query 4. Description is a user friendly explanation of the change ### Format -`[Internal](Added/Fixed)(Category):(Description)` +`[Internal][Added|Fixed](Category):(Description)` ### Example -Added Diagnostics: GetElapsedClientLatency to CosmosDiagnostics -Fixed PartitionKey: null reference when using default(PartitionKey) +[Added] Diagnostics: GetElapsedClientLatency to CosmosDiagnostics +[Fixed] PartitionKey: null reference when using default(PartitionKey) [Internal] Added Query: code generator for CosmosNumbers for easy additions in the future. ## Description From 1800df04efd88cb53dfa7ebf0b7ac8973518a0aa Mon Sep 17 00:00:00 2001 From: j82w Date: Thu, 2 Apr 2020 16:42:48 -0700 Subject: [PATCH 12/14] updating regex --- .github/workflows/prlint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml index aa9b8dc3c9..324bfa6aa0 100644 --- a/.github/workflows/prlint.yml +++ b/.github/workflows/prlint.yml @@ -10,6 +10,6 @@ jobs: steps: - uses: morrisoncole/pr-lint-action@v1.0.0 with: - title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' + title-regex: '(\[Internal\])? \[(Added|Fixed)\] .{3}.+: .{3}.+' on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" - repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + repo-token: "${{ secrets.GITHUB_TOKEN }}" From 0022da4b76fd7c38a8092adb413df87b0c9ceba6 Mon Sep 17 00:00:00 2001 From: j82w Date: Thu, 2 Apr 2020 16:44:13 -0700 Subject: [PATCH 13/14] Removing space --- .github/workflows/prlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml index 324bfa6aa0..1b1beb4cfc 100644 --- a/.github/workflows/prlint.yml +++ b/.github/workflows/prlint.yml @@ -10,6 +10,6 @@ jobs: steps: - uses: morrisoncole/pr-lint-action@v1.0.0 with: - title-regex: '(\[Internal\])? \[(Added|Fixed)\] .{3}.+: .{3}.+' + title-regex: '(\[Internal\])?\[(Added|Fixed)\] .{3}.+: .{3}.+' on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" repo-token: "${{ secrets.GITHUB_TOKEN }}" From e58f3ab50b8dd1f175096edae750105087fa8be9 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Fri, 3 Apr 2020 06:52:22 -0700 Subject: [PATCH 14/14] Updated based on user suggestion --- .github/workflows/prlint.yml | 4 ++-- PULL_REQUEST_TEMPLATE.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prlint.yml b/.github/workflows/prlint.yml index aa9b8dc3c9..95c2f2071d 100644 --- a/.github/workflows/prlint.yml +++ b/.github/workflows/prlint.yml @@ -10,6 +10,6 @@ jobs: steps: - uses: morrisoncole/pr-lint-action@v1.0.0 with: - title-regex: '(\[Internal\])? (Added|Fixed) .{3}.+: .{3}.+' - on-failed-regex-comment: "Please follow the required format. [Internal] (Added|Fixed) Category: Description" + title-regex: '(\[Internal\] )?.{3}.+: (Add|Fix) .{3}.+' + on-failed-regex-comment: "Please follow the required format. [Internal] Category: (Add|Fix) Description" repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 62d0655d5b..07fc6625a8 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -5,11 +5,11 @@ 2. PR titles will be formatted with the following layout. 1. Internal is optional and represents changes with no public facing changes such as test only changes 2. Category represents the area of the change like batch, changefeed, point operation, or query - 3. Added or Fixed identifies if a new feature is being added or if a bug is being fixed + 3. Add or Fix identifies if a new feature is being added or if a bug is being fixed 4. Description is a user friendly explanation of the change ### Format -`[Internal](Added/Fixed)(Category):(Description)` +`[Internal]Category: (Add|Fix) Description` ### Example Added Diagnostics: GetElapsedClientLatency to CosmosDiagnostics