Skip to content

Commit f2e2f17

Browse files
committed
Rename dev branch to main for consistency
1 parent 823367e commit f2e2f17

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
trigger:
20-
- dev
20+
- main
2121

2222

2323
stages:

ci/compare-codecov.ps1

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<#
44
.SYNOPSIS
5-
Compares code coverage percent of local coverage.xml file to dev branch
5+
Compares code coverage percent of local coverage.xml file to main branch
66
(Azure Pipeline API).
77
88
.PARAMETER wd
@@ -41,25 +41,25 @@ $ApiBase = "https://dev.azure.com/$org/$project"
4141

4242

4343
# Get list of all recent builds.
44-
$devBuildJson = (
45-
Invoke-WebRequest "$ApiBase/_apis/build/builds?branchName=refs/heads/dev&api-version=5.1"
44+
$mainBuildJson = (
45+
Invoke-WebRequest "$ApiBase/_apis/build/builds?branchName=refs/heads/main&api-version=5.1"
4646
).Content | ConvertFrom-Json
4747

4848
# Get the latest matching build ID from the list of builds.
49-
foreach ($build in $devBuildJson.value) {
49+
foreach ($build in $mainBuildJson.value) {
5050
if ($build.definition.name -eq $pipeline_name) {
51-
$devLatestId = $build.id
51+
$mainLatestId = $build.id
5252
break
5353
}
5454
}
5555

5656
# Retrieve code coverage for this build ID.
57-
$devCoverageJson = (
58-
Invoke-WebRequest "$ApiBase/_apis/test/codecoverage?buildId=$devLatestId&api-version=5.1-preview.1"
57+
$mainCoverageJson = (
58+
Invoke-WebRequest "$ApiBase/_apis/test/codecoverage?buildId=$mainLatestId&api-version=5.1-preview.1"
5959
).Content | ConvertFrom-Json
60-
foreach ($cov in $devCoverageJson.coverageData.coverageStats) {
60+
foreach ($cov in $mainCoverageJson.coverageData.coverageStats) {
6161
if ($cov.label -eq "Lines") {
62-
$devlinerate = [math]::Round(($cov.covered / $cov.total) * 100, 2)
62+
$mainLinerate = [math]::Round(($cov.covered / $cov.total) * 100, 2)
6363
}
6464
}
6565

@@ -84,21 +84,21 @@ $branchlinerate = [math]::Round([decimal]$BranchXML.coverage.'line-rate' * 100,
8484

8585

8686
Write-Output ""
87-
Write-Output "Dev branch coverage rate: $devlinerate%"
87+
Write-Output "Main branch coverage rate: $mainLinerate%"
8888
Write-Output "This branch coverage rate: $branchlinerate%"
8989

90-
if ($devlinerate -eq 0) {
90+
if ($mainLinerate -eq 0) {
9191
$change = "Infinite"
9292
}
9393
else {
94-
$change = [math]::Abs($branchlinerate - $devlinerate)
94+
$change = [math]::Abs($branchlinerate - $mainLinerate)
9595
}
9696

97-
if ($branchlinerate -gt $devlinerate) {
97+
if ($branchlinerate -gt $mainLinerate) {
9898
Write-Host "Coverage increased by $change% 😀" -ForegroundColor Green
9999
exit 0
100100
}
101-
elseif ($branchlinerate -eq $devlinerate) {
101+
elseif ($branchlinerate -eq $mainLinerate) {
102102
Write-Host "Coverage has not changed." -ForegroundColor Green
103103
exit 0
104104
}

docs/contributing/index.rst

+16-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Developing Wagtail CRX
77

88
To create a test project locally:
99

10-
#. Clone the code from https://github.com/coderedcorp/coderedcms (dev branch).
10+
#. Clone the code from https://github.com/coderedcorp/coderedcms (main branch).
1111
#. Run ``pip install -r requirements-dev.txt`` from the root coderedcms
1212
directory. This will install development tools, and also make the install
1313
editable, which is relevant when running ``makemigrations`` in test project
@@ -38,22 +38,23 @@ Each production project that uses coderedcms should specify the appropriate
3838
version in its requirements.txt to prevent breakage.
3939

4040
.. note::
41-
When testing existing projects with coderedcms installed from a development
42-
branch, be sure to use a disposable database, as it is likely that the
43-
migrations will not be the same migrations that get released.
41+
42+
When testing existing projects with coderedcms installed from a development
43+
branch, be sure to use a disposable database, as it is likely that the
44+
migrations will not be the same migrations that get released.
4445

4546

4647
Branching Strategy
4748
------------------
4849

4950
Primary development takes place in individual branches for each feature or bug.
50-
Changes are then made as a pull request against the ``dev`` branch.
51+
Changes are then made as a pull request against the ``main`` branch.
5152

52-
The ``dev`` branch is the primary working branch, representing the development
53+
The ``main`` branch is the primary working branch, representing the development
5354
version of coderedcms.
5455

5556
Releases are maintained in ``release/X.Y`` branches, where X is the Major
56-
version and Y is the Minor version. Maintenance patches are applied in ``dev``
57+
version and Y is the Minor version. Maintenance patches are applied in ``main``
5758
(if applicable) and then merged or cherry-picked into the respective release
5859
branch.
5960

@@ -112,7 +113,7 @@ license header comment states copyright, ownership, license, and also provides c
112113
/*!
113114
Wagtail CRX (https://www.coderedcorp.com/cms/)
114115
Copyright 2018-2021 CodeRed LLC
115-
License: https://github.com/coderedcorp/coderedcms/blob/dev/LICENSE
116+
License: https://github.com/coderedcorp/coderedcms/blob/main/LICENSE
116117
@license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
117118
*/
118119
@@ -155,8 +156,8 @@ code coverage percentage in the console:
155156
Detailed test coverage reports are now available by opening ``htmlcov/index.html``
156157
in your browser (which is ignored by version control).
157158

158-
To compare your current code coverage against the code coverage of the dev
159-
branch (based on latest Azure Pipeline build from dev) run:
159+
To compare your current code coverage against the code coverage of the main
160+
branch (based on latest Azure Pipeline build from main) run:
160161

161162
.. code-block:: console
162163
@@ -240,10 +241,10 @@ request process to ensure quality.**
240241
Merging Pull Requests
241242
---------------------
242243

243-
Follow these guidelines to merge a pull request into the dev branch:
244+
Follow these guidelines to merge a pull request into the main branch:
244245

245246
* Unit tests pass.
246-
* Code coverage is not lower than dev branch.
247+
* Code coverage is not lower than main branch.
247248
* Documentation builds, and the PR provides documentation (release notes at a
248249
minimum).
249250
* If there is a related issue, the issue is referenced and/or closed (if
@@ -255,11 +256,11 @@ Follow these guidelines to merge a pull request into the dev branch:
255256
In the event that the pull request needs more work that the author is unable to
256257
provide, the following process should be followed:
257258

258-
* Create a new branch from dev in the form of ``merge/pr-123`` where 123 is
259+
* Create a new branch from main in the form of ``merge/pr-123`` where 123 is
259260
the original pull request number.
260-
* Edit the pull request to merge into the new branch instead of dev.
261+
* Edit the pull request to merge into the new branch instead of main.
261262
* Make the necessary changes and submit for review using the normal process.
262-
* When merging this branch into dev, follow the same process above, but be
263+
* When merging this branch into main, follow the same process above, but be
263264
sure to credit the original author(s) by adding their names to the bottom of
264265
the commit message as so (see
265266
`GitHub documentation <https://help.github.com/en/articles/creating-a-commit-with-multiple-authors>`_):

0 commit comments

Comments
 (0)