Skip to content

Commit

Permalink
Fix master-> main renaming in tests and docs (plone#5251)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh authored Sep 30, 2023
1 parent 6fad654 commit 734c893
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Documentation
on:
push:
branches:
- master
- main
paths:
- 'docs/**'
# Build pull requests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/towncrier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- master
- main

env:
node-version: 18.x
Expand All @@ -25,8 +25,8 @@ jobs:
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
# Source: https://github.com/actions/checkout/#fetch-all-branches.
git fetch --no-tags origin master
towncrier check --compare-with origin/master
git fetch --no-tags origin main
towncrier check --compare-with origin/main
env:
BASE_BRANCH: ${{ github.base_ref }}
if: github.event_name == 'pull_request'
4 changes: 2 additions & 2 deletions .github/workflows/update_remote_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Trigger build and deploy of Plone 6 documentation
on:
push:
branches:
- "master"
- "main"
paths:
- "docs/*"

Expand All @@ -16,4 +16,4 @@ jobs:
-H "Authorization: Bearer ${{secrets.DOCUMENTATION_BUILD_APPLICATION_KEY}}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/plone/documentation/actions/workflows/update_submodule.yml/dispatches \
-d '{"ref": "6-dev"}'
-d '{"ref": "6-dev"}'
10 changes: 5 additions & 5 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ To ease the release process, we use the utility [`release-it`](https://www.npmjs

To start a release, you must fulfill the following requirements:

- Have permission to push to `master` branch
- Have permission to push to `main` branch
- Have permission on the [`@plone` organization on npm](https://www.npmjs.com/org/plone).
- Have an environment variable `GITHUB_TOKEN` with a GitHub personal token with permissions to write to the [Volto Release page on GitHub](https://github.com/plone/volto/releases).
- Install [`pipx`](https://pypa.github.io/pipx/) in your system.

To request these permissions, on GitHub tag `@plone/release-team`, or in Discord post to the [`release-team` channel](https://discord.com/channels/786421998426521600/897549410521714760).

### Permission to push to `master` branch
### Permission to push to `main` branch

The release process involves pushing directly to the `master` branch.
Volto's `master` branch is protected, so the releaser needs to have permission for pushing to it.
At the moment of this writing, members of the GitHub group `@plone/volto-team` have permission to push to `master`.
The release process involves pushing directly to the `main` branch.
Volto's `main` branch is protected, so the releaser needs to have permission for pushing to it.
At the moment of this writing, members of the GitHub group `@plone/volto-team` have permission to push to `main`.

### Permission to release Volto to npm registry

Expand Down
2 changes: 1 addition & 1 deletion api/buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ show-picked-versions = true
[sources]
plone.volto = git https://github.com/plone/plone.volto.git branch=main
plone.rest = git [email protected]:plone/plone.rest.git branch=master
plone.restapi = git https://github.com/plone/plone.restapi.git pushurl[email protected]:plone/plone.restapi.git branch=master
plone.restapi = git https://github.com/plone/plone.restapi.git pushurl[email protected]:plone/plone.restapi.git branch=main

[instance]
recipe = plone.recipe.zope2instance
Expand Down
4 changes: 2 additions & 2 deletions cypress/tests/core/blocks/blocks-chooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Blocks Tests', () => {
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.block.image .ui.input input[type="text"]').type(
`https://github.com/plone/volto/raw/master/logos/volto-colorful.png{enter}`,
`https://github.com/plone/volto/raw/main/logos/volto-colorful.png{enter}`,
);
cy.get('#toolbar-save').click();
cy.url().should('eq', Cypress.config().baseUrl + '/my-page');
Expand All @@ -36,7 +36,7 @@ describe('Blocks Tests', () => {
cy.get('#page-document img').should(
'have.attr',
'src',
'https://github.com/plone/volto/raw/master/logos/volto-colorful.png',
'https://github.com/plone/volto/raw/main/logos/volto-colorful.png',
);

cy.get('#page-document img')
Expand Down
4 changes: 2 additions & 2 deletions cypress/tests/core/blocks/blocks-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Blocks Tests', () => {
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.block.image .ui.input input[type="text"]').type(
`https://github.com/plone/volto/raw/master/logos/volto-colorful.png{enter}`,
`https://github.com/plone/volto/raw/main/logos/volto-colorful.png{enter}`,
);
cy.get('#toolbar-save').click();
cy.url().should('eq', Cypress.config().baseUrl + '/my-page');
Expand All @@ -39,7 +39,7 @@ describe('Blocks Tests', () => {
cy.get('#page-document img').should(
'have.attr',
'src',
'https://github.com/plone/volto/raw/master/logos/volto-colorful.png',
'https://github.com/plone/volto/raw/main/logos/volto-colorful.png',
);

cy.get('#page-document img')
Expand Down
6 changes: 2 additions & 4 deletions cypress/tests/core/blocks/blocks-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ describe('Blocks Tests', () => {
cy.get(' #field-preview_image')
.last()
.click()
.type(
'https://github.com/plone/volto/raw/master/logos/volto-colorful.png',
);
.type('https://github.com/plone/volto/raw/main/logos/volto-colorful.png');
cy.get('#toolbar-save').click();

cy.wait('@save');
Expand All @@ -68,7 +66,7 @@ describe('Blocks Tests', () => {
.should('have.attr', 'src')
.and(
'match',
/https:\/\/github.com\/plone\/volto\/raw\/master\/logos\/volto-colorful.png/,
/https:\/\/github.com\/plone\/volto\/raw\/main\/logos\/volto-colorful.png/,
);
});

Expand Down
4 changes: 2 additions & 2 deletions cypress/tests/minimal/blocks-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Blocks Tests', () => {
cy.get('.ui.basic.icon.button.block-add-button').click();
cy.get('.ui.basic.icon.button.image').contains('Image').click();
cy.get('.block.image .ui.input input[type="text"]').type(
`https://github.com/plone/volto/raw/master/logos/volto-colorful.png{enter}`,
`https://github.com/plone/volto/raw/main/logos/volto-colorful.png{enter}`,
);
cy.get('#toolbar-save').click();
cy.wait('@content');
Expand All @@ -37,7 +37,7 @@ describe('Blocks Tests', () => {
cy.get('#page-document img').should(
'have.attr',
'src',
'https://github.com/plone/volto/raw/master/logos/volto-colorful.png',
'https://github.com/plone/volto/raw/main/logos/volto-colorful.png',
);

cy.get('#page-document img')
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you have some experience with Python development, you can also install a Plon
from source. The Volto source repository contains an example Plone backend configuration
using zc.buildout.

https://github.com/plone/volto/tree/master/api
https://github.com/plone/volto/tree/main/api

From this folder you only need to copy the `buildout.cfg` and `requirements.txt` files to
a folder on your development system. As with the Docker container setup of Plone, setting
Expand Down
4 changes: 2 additions & 2 deletions docs/source/configuration/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ add-ons configuration in `config` argument. Next, perform all the required modif
to the config and finally, return the config object.

By reading Volto's
[src/config/index.js](https://github.com/plone/volto/blob/master/src/config/index.js),
[src/config/index.js](https://github.com/plone/volto/blob/main/src/config/index.js),
you'll get to see that Volto provides some default configuration objects
(`blocks`, `widgets`, `settings`, etc), passes them through the
`applyAddonConfiguration()` function, which allows any installed addons to
Expand All @@ -78,7 +78,7 @@ See {doc}`settings-reference` for details.

The `widgets` object holds the widget registry, used to decide which widget
should be used when rendering forms. Check [its
definition](https://github.com/plone/volto/blob/master/src/config/Widgets.jsx)
definition](https://github.com/plone/volto/blob/main/src/config/Widgets.jsx)
but also the [lookup
mechanism](https://github.com/plone/volto/blob/6fd62cb2860bc7cf3cb7c36ea86bfd8bd03247d9/src/components/manage/Form/Field.jsx#L112)
to understand how things work.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/settings-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contentIcons
With this property you can configure Content Types icons.
Those are visible in Contents view (ex "Folder contents"). The default
ones are in
[config/ContentIcons.jsx](https://github.com/plone/volto/blob/master/src/config/ContentIcons.jsx)
[config/ContentIcons.jsx](https://github.com/plone/volto/blob/main/src/config/ContentIcons.jsx)
and you can extend them in your project's config for custom content types
using `settings.contentIcons`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/volto-slate/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const isInline = (editor) => {

Plugins are the way to extend the capabilities of `volto-slate` by adding extra features to {term}`elementEditor`.

See the [default plugins](https://github.com/plone/volto/tree/master/packages/volto-slate/src/editor/plugins).
See the [default plugins](https://github.com/plone/volto/tree/main/packages/volto-slate/src/editor/plugins).

Refer to {ref}`writing-plugins-label` for how to write your own plugin.

Expand Down
16 changes: 8 additions & 8 deletions docs/source/contributing/branch-policy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Volto team enforces the following branch policy when developers contribute to its core.

Releases of general packages (`@plone/generator-volto`, `@plone/scripts`, and so on) are cut from the `master` branch.
Releases of general packages (`@plone/generator-volto`, `@plone/scripts`, and so on) are cut from the `main` branch.

stable and latest
: The terms _stable_ and _latest_ mean the same thing in this policy.
Expand All @@ -10,27 +10,27 @@ stable and latest
canary
: The term _canary_ refers to the metaphorical canary in a coalmine; if an issue is detected following its release, the damage is limited to only those users who have installed it.
It usually includes experimental and breaking features for testing.
During the development process, a canary release will be cut from the `master` branch.
During the development process, a canary release will be cut from the `main` branch.
When it becomes worthy of a beta or release candidate version, a new numbered branch should be cut, and non-breaking changes must be merged into it.

legacy
: A version that it is unsupported and receives no bug fixes.
It has no branch name in git.

`master`
`main`
: This is the bleeding edge branch in git.
It is the branch upon which future development occurs, and from which future releases shall be cut.

When we cut a release candidate, we:

1. create a new numbered git branch from master, and
1. create a new numbered git branch from main, and
2. cut a release candidate version whose name aligns with the new numbered git branch.

For example, when we cut the release candidate version 16.0.0-rc.1, we created a git branch `16.x.x`.
We also freeze the release candidate, and stop adding features to it.
This allows us to continue development on `master`, which may include both breaking changes that must not be backported, and bug fixes and feature additions that may be backported but only after the release candidate becomes final.
This allows us to continue development on `main`, which may include both breaking changes that must not be backported, and bug fixes and feature additions that may be backported but only after the release candidate becomes final.

When opening a pull request, the contributor must open it against `master`.
When opening a pull request, the contributor must open it against `main`.
If the pull request is a feature or a bugfix, and if the release manager deems it useful to the latest version's branch, they may ask the contributor to backport it to that branch.

`16.x.x`
Expand All @@ -44,6 +44,6 @@ legacy

## Translation contributing policy

Due to the nature of `master` and `16.x.x` branches, some developments that may land in `master` may not be backported to `16.x.x`. This means that many translations that may come with those developments will be useless in the `16.x.x` branch and thus porting them to `16.x.x` makes no sense.
Due to the nature of `main` and `16.x.x` branches, some developments that may land in `main` may not be backported to `16.x.x`. This means that many translations that may come with those developments will be useless in the `16.x.x` branch and thus porting them to `16.x.x` makes no sense.

So when contributing translations, please create PRs directly from branches created from `16.x.x` and point your PRs to that exact branch instead of `master`.
So when contributing translations, please create PRs directly from branches created from `16.x.x` and point your PRs to that exact branch instead of `main`.
2 changes: 1 addition & 1 deletion docs/source/contributing/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ myst:
# Icons

Volto has a pre-defined set of SVG icons from the Pastanaga UI icon system.
They are available under [Volto icons](https://github.com/plone/volto/tree/master/src/icons).
They are available under [Volto icons](https://github.com/plone/volto/tree/main/src/icons).

The following example shows how to display one of these icons.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can find the current Storybook build in: https://6.docs.plone.org/storybook

The idea is that Quanta will become the design system for Plone 6 when it's finished. For now, Pastanaga and Quanta are treated as preliminary work and style guide to help Volto and Plone 6 a reality.

It has been already some work on Quanta here and there, the idea is to adopt it bit by bit, since implementing it overnight would be impossible since maintaining both efforts, master and Quanta in sync would be crazy.
It has been already some work on Quanta here and there, the idea is to adopt it bit by bit, since implementing it overnight would be impossible since maintaining both efforts, main and Quanta in sync would be crazy.

Quanta for now have the shape of a Volto addon: https://github.com/plone/volto-quanta

Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ You may choose to install the canary version, which is the latest alpha release,
yo @plone/volto --help
```
or take a look at the [README](https://github.com/plone/volto/blob/master/packages/generator-volto/README.md) for more information.
or take a look at the [README](https://github.com/plone/volto/blob/main/packages/generator-volto/README.md) for more information.
````
3. Change directory to the newly created folder `myvoltoapp` (or the one you've chosen):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/creating-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In addition to bootstrapping stand-alone Volto projects, it can also bootstrap V
yo @plone/volto --help
```

or take a look at the [README](https://github.com/plone/volto/blob/master/packages/generator-volto/README.md) for more information.
or take a look at the [README](https://github.com/plone/volto/blob/main/packages/generator-volto/README.md) for more information.
````

3. Change directory to the newly created folder `myvoltoapp` (or the one you've chosen).
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/customizing-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ myst:
You are able to customize the existing Volto components using a pattern called
{term}`component shadowing` using the `customizations` folder. You have to identify and locate
the component that you want to customize, let's say the Logo component in [Volto source
code](https://github.com/plone/volto/tree/master/src).
code](https://github.com/plone/volto/tree/main/src).

```{tip}
Those familiar with Plone's JBOT customizing add-on will recognize this pattern
Expand Down
2 changes: 1 addition & 1 deletion docs/source/theming/custom-styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Volto look and feel is a Semantic UI theme that implements Pastanaga UI, called
You can find it in the source code:
`node_modules/@plone/volto/theme/themes/pastanaga`
or on Github:
https://github.com/plone/volto/tree/master/theme/themes/pastanaga
https://github.com/plone/volto/tree/main/theme/themes/pastanaga
```

Pastanaga Theme is an example on how to customize the default Semantic UI look
Expand Down
2 changes: 1 addition & 1 deletion docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ Since Volto 9.2.0 the next step IS NOT required anymore.
```

~~Copy (and overwrite) the `patches` folder into your local project
https://github.com/plone/volto/tree/master/patches or, if you want to be more accurate,
https://github.com/plone/volto/tree/main/patches or, if you want to be more accurate,
just copy `patches/razzle-plugins.patch` file and overwrite `patches/patchit.sh` file.~~

### Babel config housekeeping
Expand Down
1 change: 1 addition & 0 deletions news/5251.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix tests and documentation broken because the renaming master->main @sneridagh
2 changes: 1 addition & 1 deletion src/components/manage/Blocks/Video/View.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test('renders a view video component with placeholder', () => {
'@type': 'video',
url: 'https://youtu.be/KqjeO_ekW3g',
preview_image:
'https://github.com/plone/volto/raw/master/logos/volto-colorful.png',
'https://github.com/plone/volto/raw/main/logos/volto-colorful.png',
}}
/>,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports[`renders a view video component with placeholder 1`] = `
/>
<img
className="placeholder"
src="https://github.com/plone/volto/raw/master/logos/volto-colorful.png"
src="https://github.com/plone/volto/raw/main/logos/volto-colorful.png"
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/storybook.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ const initialState = () => ({
entityRanges: [],
inlineStyleRanges: [],
key: '55n44',
text: 'You can use this site to test Volto. It runs on the master branch of Volto using latest Plone 5.2 Backend running on Python 3.',
text: 'You can use this site to test Volto. It runs on the main branch of Volto using latest Plone 5.2 Backend running on Python 3.',
type: 'unstyled',
},
],
Expand Down Expand Up @@ -886,7 +886,7 @@ const initialState = () => ({
entityRanges: [],
inlineStyleRanges: [],
key: '55n44',
text: 'You can use this site to test Volto. It runs on the master branch of Volto using latest Plone 5.2 Backend running on Python 3.',
text: 'You can use this site to test Volto. It runs on the main branch of Volto using latest Plone 5.2 Backend running on Python 3.',
type: 'unstyled',
},
],
Expand Down

0 comments on commit 734c893

Please sign in to comment.