Skip to content

Commit

Permalink
[Internal] PR Requirements: Add PR title requirements to allow change…
Browse files Browse the repository at this point in the history
…log generation (#1322)

* 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.

* Updated based on feedback

* Fixed grammar

* More fixes

* Adding pr lint action

* Try single quotes to fix parse error

* Trying to move it to build yaml

* Try including all changes

* Updating

* Reverting changes

* updated based on feedback

* updating regex

* Removing space

* Updated based on user suggestion
  • Loading branch information
j82w authored Apr 3, 2020
1 parent b089914 commit cf547f3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/prlint.yml
Original file line number Diff line number Diff line change
@@ -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\] )?.{3}.+: (Add|Fix) .{3}.+'
on-failed-regex-comment: "Please follow the required format. [Internal] Category: (Add|Fix) Description"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
16 changes: 16 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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 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. 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] Category: (Add|Fix) 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.
Expand Down
5 changes: 2 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ pr:
- releases/*
paths:
include:
- Microsoft.Azure.Cosmos/*
- NuGet.config
- /*

variables:
DebugArguments: ' --filter "TestCategory!=Quarantine & TestCategory!=Functional" --verbosity normal '
Expand All @@ -22,7 +21,7 @@ jobs:
parameters:
BuildConfiguration: Release
VmImage: $(VmImage)


#- template: templates/build-test.yml
# parameters:
Expand Down

0 comments on commit cf547f3

Please sign in to comment.