Amp-wp: Eliminate the use of 'master' branch name and whitelist/blacklist terminology

Created on 19 Jun 2020  路  6Comments  路  Source: ampproject/amp-wp

As proposed in WordPress Make/Core, and as has been proposed and actioned on throughout the industry, we should eliminate the use of the master from the codebase due to its negative connotations with slavery. This has already been done for worker-dom and it is also being worked on for other AMP repos. GitHub is going to eliminate it as well.

The impact will be minimal since we already use develop as our development branch. In reality, we don't even need the ~master~ branch since it is identical to the state of the most recent stable release tag. Can we just delete it?

We also need to update the codebase to eliminate the terms allowlist and blacklist. This will be done as part of a spec update, as it has already been implemented in AMP.

_Happy Juneteenth!_

Changelogged Core

Most helpful comment

The ~master~ branch has been deleted.

Before:

Screen Shot 2020-06-19 at 13 30 12

After:

image

image

Deleted HEAD:

commit 4e4195e977560754e780426bea2f261d945ec6fc
Merge: 00f36e8d3 447816862
Author: Weston Ruter <[email protected]>
Date:   Wed Apr 15 14:55:41 2020 -0700

    Merge tag '1.5.3'

    * tag '1.5.3':
      Bump 1.5.3
      Bump version to 1.5.3-RC1
      Fix handling of Mustache templates (#4583)
      Stub request based on test scenario (#4588)
      Update tests after block-library/style.css changes in Gutenberg 7.9 (#4579)
      Restrict doing plugin upgrade routine when not in admin (#4538)
      Add new accessibility sanitizer (#4535)
      Fix unit tests (#4564)
      Add button into Site Health to reenable CSS transient caching (#4522)
      Restore unification of multi-page post content in Reader mode (#4547)
      Prevent styles from being removed when in Customizer preview with Standard mode (#4553)
      Omit Jetpack from being activated during PHPUnit test runs (#4474)
      Mock Facebook embed tests (#4474)
      Mock Imgur embed tests (#4474)
      Use title case for Paired Browsing link in edit post screen (#4540)
      Ensure that validation query vars persist through redirects (#4544)
      Add requirements to plugin file header (#4543)
      Force status code of validation responses to be 200 (#4533)
      Update optimizer test specs (#4527)
      Bump 1.5.3-alpha

All 6 comments

If it makes one more person comfortable contributing to the project, then I'm for it :+1:.


The impact will be minimal since we already use develop as our development branch. In reality, we don't even need the ~master~ branch since it is identical to the state of the most recent stable release tag. Can we just delete it?

I'd like to think majority of developers see the ~master~ branch as the latest stable version of the project. The only problem I could see with removing it (well, an inconvenience really) is that if someone were to clone the repository, they would be on the develop branch by default. They would then have to find out the latest stable version of the plugin, and then finally check out to that release tag.

The ~master~ branch would essentially be an alias for the latest stable release.

Yes, the ~master~ branch is an alias for the latest stable release. That's the only purpose it serves. How about we eliminate it for now, and if it turns out that people are wanting it, we can re-add a branch for this purpose, like latest. Otherwise, if someone wants to be on the latest state of the codebase, all they have to do is just:

git fetch --tags
git checkout $(git tag --sort=-v:refname | grep -v '-' | head -n 1)

Sounds good.

I added that to the Engineering Guidelines doc:

image

The ~master~ branch has been deleted.

Before:

Screen Shot 2020-06-19 at 13 30 12

After:

image

image

Deleted HEAD:

commit 4e4195e977560754e780426bea2f261d945ec6fc
Merge: 00f36e8d3 447816862
Author: Weston Ruter <[email protected]>
Date:   Wed Apr 15 14:55:41 2020 -0700

    Merge tag '1.5.3'

    * tag '1.5.3':
      Bump 1.5.3
      Bump version to 1.5.3-RC1
      Fix handling of Mustache templates (#4583)
      Stub request based on test scenario (#4588)
      Update tests after block-library/style.css changes in Gutenberg 7.9 (#4579)
      Restrict doing plugin upgrade routine when not in admin (#4538)
      Add new accessibility sanitizer (#4535)
      Fix unit tests (#4564)
      Add button into Site Health to reenable CSS transient caching (#4522)
      Restore unification of multi-page post content in Reader mode (#4547)
      Prevent styles from being removed when in Customizer preview with Standard mode (#4553)
      Omit Jetpack from being activated during PHPUnit test runs (#4474)
      Mock Facebook embed tests (#4474)
      Mock Imgur embed tests (#4474)
      Use title case for Paired Browsing link in edit post screen (#4540)
      Ensure that validation query vars persist through redirects (#4544)
      Add requirements to plugin file header (#4543)
      Force status code of validation responses to be 200 (#4533)
      Update optimizer test specs (#4527)
      Bump 1.5.3-alpha

QA passed:

There are still some instances of master, blacklist and whitelist in the project, but that's a side-effect from:

  • direct and indirect dependencies in use
  • code comments that require use of these terms (eg. ignoring a code style rule, or link to docs)

Count of instances of whitelist:

image

Count of instances of blacklist:

image

Count of instances of master:

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexhaller picture alexhaller  路  5Comments

miina picture miina  路  3Comments

swissspidy picture swissspidy  路  5Comments

maciejmackowiak picture maciejmackowiak  路  5Comments

westonruter picture westonruter  路  4Comments