Skip to content

Commit a869d5d

Browse files
emilyrohrboughBlue F
and
Blue F
authored
chore: enforce changelog entries on PR reviews (#25459)
Co-authored-by: Blue F <blue@cypress.io>
1 parent 0ae4b67 commit a869d5d

34 files changed

+1605
-83
lines changed

.circleci/workflows.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters
4141
- matches:
4242
pattern: /^release\/\d+\.\d+\.\d+$/
4343
value: << pipeline.git.branch >>
44+
4445
linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
4546
when:
4647
or:
@@ -1431,14 +1432,17 @@ jobs:
14311432
path: packages/errors/__snapshot-images__
14321433
- store-npm-logs
14331434

1434-
unit-tests-release:
1435+
verify-release-readiness:
14351436
<<: *defaults
14361437
resource_class: small
14371438
parallelism: 1
1439+
environment:
1440+
GITHUB_TOKEN: $GH_TOKEN
14381441
steps:
14391442
- restore_cached_workspace
14401443
- update_known_hosts
14411444
- run: yarn test-npm-package-release-script
1445+
- run: node ./scripts/semantic-commits/validate-binary-changelog.js
14421446

14431447
lint-types:
14441448
<<: *defaults
@@ -2373,7 +2377,7 @@ linux-x64-workflow: &linux-x64-workflow
23732377
- unit-tests:
23742378
requires:
23752379
- build
2376-
- unit-tests-release:
2380+
- verify-release-readiness:
23772381
context: test-runner:npm-release
23782382
requires:
23792383
- build
@@ -2547,7 +2551,7 @@ linux-x64-workflow: &linux-x64-workflow
25472551
- server-unit-tests
25482552
- test-kitchensink
25492553
- unit-tests
2550-
- unit-tests-release
2554+
- verify-release-readiness
25512555
- cli-visual-tests
25522556
- reporter-integration-tests
25532557
- run-app-component-tests-chrome

.github/PULL_REQUEST_TEMPLATE.md

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77

88
- Closes <!-- link to the issue here, if there is one -->
99

10-
### User facing changelog
11-
<!--
12-
Explain the change(s) for every user to read in our changelog. Examples: https://on.cypress.io/changelog
13-
If the change is not user-facing, write "n/a".
14-
-->
15-
1610
### Additional details
1711
<!-- Examples:
1812
- Why was this change necessary?

.github/workflows/semantic-pull-request.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ on:
99

1010
jobs:
1111
main:
12-
name: Lint Title
12+
name: Semantic Pull Request
1313
runs-on: ubuntu-latest
1414
steps:
15-
# use a fork of the GitHub action - we cannot pull in untrusted third party actions
16-
# see https://github.com/cypress-io/cypress/pull/20091#discussion_r801799647
17-
- uses: cypress-io/action-semantic-pull-request@v4
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
- name: Checkout
16+
uses: actions/checkout@v3
2017
with:
21-
validateSingleCommit: true
18+
ref: ${{ github.event.pull_request.head.ref }}
19+
repository: ${{ github.event.pull_request.head.repo.full_name }}
20+
- run: npm install
21+
working-directory: scripts/github-actions/semantic-pull-request/
22+
- name: Lint PR Title and Cypress Changelog Entry
23+
if: github.event_name == 'pull_request_target'
24+
uses: actions/github-script@v4
25+
with:
26+
script: |
27+
const verifyPullRequest = require('./scripts/github-actions/semantic-pull-request')
28+
29+
await verifyPullRequest({ context, core, github })

.releaserc.base.js

-20
This file was deleted.

.releaserc.js

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
const { parserOpts, releaseRules } = require('./scripts/semantic-commits/change-categories')
2+
13
module.exports = {
2-
...require('./.releaserc.base'),
4+
plugins: [
5+
['@semantic-release/commit-analyzer', {
6+
preset: 'angular',
7+
parserOpts,
8+
releaseRules,
9+
}],
10+
['@semantic-release/release-notes-generator',
11+
{
12+
preset: 'angular',
13+
parserOpts,
14+
}
15+
],
16+
['@semantic-release/changelog', {
17+
changelogFile: 'CHANGELOG.md',
18+
}],
19+
['@semantic-release/git', {
20+
assets: [
21+
'./CHANGELOG.md',
22+
],
23+
message: 'chore: release ${nextRelease.gitTag}\n\n[skip ci]',
24+
}],
25+
'@semantic-release/npm',
26+
],
27+
extends: 'semantic-release-monorepo',
28+
branches: [
29+
{ name: 'develop', channel: 'latest' },
30+
],
331
}

CONTRIBUTING.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,22 @@ We do not continuously deploy the Cypress binary, so `develop` contains all of t
459459
- Break down pull requests into the smallest necessary parts to address the original issue or feature. This helps you get a timely review and helps the reviewer clearly understand which pieces of the code changes are relevant.
460460
- When opening a PR for a specific issue already open, please name the branch you are working on using the convention `issue-[issue number]`. For example, if your PR fixes Issue #803, name your branch `issue-803`. If the PR is a larger issue, you can add more context like `issue-803-new-scrollable-area`. If there's not an associated open issue, **[create an issue](https://github.com/cypress-io/cypress/issues/new/choose)**.
461461
- PRs can be opened before all the work is finished. In fact we encourage this! Please create a [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests) if your PR is not ready for review. [Mark the PR as **Ready for Review**](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) when you're ready for a Cypress team member to review the PR.
462-
- Prefix the title of the Pull Request using [semantic-release](https://github.com/semantic-release/semantic-release)'s format as defined [here](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type). For example, if your PR is fixing a bug, you should prefix the PR title with `fix:`.
462+
- Prefix the title of the Pull Request using [semantic-release](https://github.com/semantic-release/semantic-release)'s format using one of the following definitions. Once committed to develop, this prefix will determine the appropriate 'next version' of Cypress or the corresponding npm module.
463+
- Changes has user-facing impact:
464+
- `breaking` - A breaking change that will require a MVB
465+
- `dependency` - A change to a dependency that impact the user
466+
- `deprecation` - A API deprecation notice for users
467+
- `feat` - A new feature
468+
- `fix` - A bug fix or regression fix.
469+
- `misc` - a misc user-facing change, like a UI update which is not a fix or enhancement to how Cypress works
470+
- `perf` - A code change that improves performance
471+
- Changes that improves the codebase or system but has no user-facing impact:
472+
- `chore` - Changes to the build process or auxiliary tools and libraries such as documentation generation
473+
- `docs` - Documentation only changes
474+
- `refactor` - A code change that neither fixes a bug nor adds a feature
475+
- `revert` - Reverts a previous commit
476+
- `test` - Adding missing or correcting existing tests
477+
- For user-facing changes that will be released with the next Cypress version, be sure to add a changelog entry to the appropriate section in [`cli/CHANGELOG.md`](./cli/CHANGELOG.md). See [Writing the Cypress Changelog Guide](./guides/writing-the-cypress-changelog.md) for more details.
463478
- Fill out the [Pull Request Template](./.github/PULL_REQUEST_TEMPLATE.md) completely within the body of the PR. If you feel some areas are not relevant add `N/A` as opposed to deleting those sections. PRs will not be reviewed if this template is not filled in.
464479
- If the PR is a user facing change and you're a Cypress team member that has logged into [ZenHub](https://www.zenhub.com/) and downloaded the [ZenHub for GitHub extension](https://www.zenhub.com/extension), set the release the PR is intended to ship in from the sidebar of the PR. Follow semantic versioning to select the intended release. This is used to generate the changelog for the release. If you don't tag a PR for release, it won't be mentioned in the changelog.
465480
![Select release for PR](https://user-images.githubusercontent.com/1271364/135139641-657015d6-2dca-42d4-a4fb-16478f61d63f.png)

cli/CHANGELOG.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2+
## 12.4.1
3+
4+
_Released 01/31/2023 (PENDING)_
5+
6+
## 12.4.0
7+
8+
_Released 1/24/2023_
9+
10+
**Features:**
11+
12+
- Added official support for Vite 4 in component testing. Addresses
13+
[#24969](https://github.com/cypress-io/cypress/issues/24969).
14+
- Added new
15+
[`experimentalMemoryManagement`](/guides/references/experiments#Configuration)
16+
configuration option to improve memory management in Chromium-based browsers.
17+
Enable this option with `experimentalMemoryManagement=true` if you have
18+
experienced "Out of Memory" issues. Addresses
19+
[#23391](https://github.com/cypress-io/cypress/issues/23391).
20+
- Added new
21+
[`experimentalSkipDomainInjection`](/guides/references/experiments#Experimental-Skip-Domain-Injection)
22+
configuration option to disable Cypress from setting `document.domain` on
23+
injection, allowing users to test Salesforce domains. If you believe you are
24+
having `document.domain` issues, please see the
25+
[`experimentalSkipDomainInjection`](/guides/references/experiments#Experimental-Skip-Domain-Injection)
26+
guide. This config option is end-to-end only. Addresses
27+
[#2367](https://github.com/cypress-io/cypress/issues/2367),
28+
[#23958](https://github.com/cypress-io/cypress/issues/23958),
29+
[#24290](https://github.com/cypress-io/cypress/issues/24290), and
30+
[#24418](https://github.com/cypress-io/cypress/issues/24418).
31+
- The [`.as`](/api/commands/as) command now accepts an options argument,
32+
allowing an alias to be stored as type "query" or "static" value. This is
33+
stored as "query" by default. Addresses
34+
[#25173](https://github.com/cypress-io/cypress/issues/25173).
35+
- The `cy.log()` command will now display a line break where the `\n` character
36+
is used. Addresses
37+
[#24964](https://github.com/cypress-io/cypress/issues/24964).
38+
- [`component.specPattern`](/guides/references/configuration#component) now
39+
utilizes a JSX/TSX file extension when generating a new empty spec file if
40+
project contains at least one file with those extensions. This applies only to
41+
component testing and is skipped if
42+
[`component.specPattern`](/guides/references/configuration#component) has been
43+
configured to exclude files with those extensions. Addresses
44+
[#24495](https://github.com/cypress-io/cypress/issues/24495).
45+
- Added support for the `data-qa` selector in the
46+
[Selector Playground](guides/core-concepts/cypress-app#Selector-Playground) in
47+
addition to `data-cy`, `data-test` and `data-testid`. Addresses
48+
[#25305](https://github.com/cypress-io/cypress/issues/25305).
49+
50+
**Bugfixes:**
51+
52+
- Fixed an issue where component tests could incorrectly treat new major
53+
versions of certain dependencies as supported. Fixes
54+
[#25379](https://github.com/cypress-io/cypress/issues/25379).
55+
- Fixed an issue where new lines or spaces on new lines in the Command Log were
56+
not maintained. Fixes
57+
[#23679](https://github.com/cypress-io/cypress/issues/23679) and
58+
[#24964](https://github.com/cypress-io/cypress/issues/24964).
59+
- Fixed an issue where Angular component testing projects would fail to
60+
initialize if an unsupported browserslist entry was specified in the project
61+
configuration. Fixes
62+
[#25312](https://github.com/cypress-io/cypress/issues/25312).
63+
64+
**Misc**
65+
66+
- Video output link in `cypress run` mode has been added to it's own line to
67+
make the video output link more easily clickable in the terminal. Addresses
68+
[#23913](https://github.com/cypress-io/cypress/issues/23913).

guides/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ For general contributor information, check out [`CONTRIBUTING.md`](../CONTRIBUTI
1717
* [Determining the next version of Cypress to be released](./next-version.md)
1818
* [E2E Open Mode Testing](./e2e-open-testing.md)
1919
* [Error handling](./error-handling.md)
20+
* [GraphQL Subscriptions - Overview and Test Guide](./graphql-subscriptions.md)
2021
* [Patching packages](./patch-package.md)
2122
* [Release process](./release-process.md)
2223
* [Testing other projects](./testing-other-projects.md)
2324
* [Testing strategy and style guide (draft)](./testing-strategy-and-styleguide.md)
2425
* [Writing cross-platform JavaScript](./writing-cross-platform-javascript.md)
26+
* [Writing the Cypress Changelog](./writing-the-cypress-changelog.md)

0 commit comments

Comments
 (0)