Skip to content

Commit ab20b6e

Browse files
committed
fix: align prettier v2 -> v3 to match pre-release workflow
Root cause of recurring lint failures on release PRs: the pre-release workflow installed latest prettier (v3.x) to format docs/history.md, but the pre-commit hook pinned mirrors-prettier at v2.5.1. The v2/v3 formatting differences caused the pre-commit check to fail. - Bump mirrors-prettier from v2.5.1 to v3.1.0 in .pre-commit-config.yaml - Pin workflow to `prettier@3` to prevent future drift - Add vendored assets (docs/diagram/, minified files) and Jinja templates to .prettierignore - One-time reformat of markdown/yaml/html files to v3 rules
1 parent 11cc3ac commit ab20b6e

23 files changed

Lines changed: 4134 additions & 4110 deletions

File tree

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
python utility/update-history.py
5555
- name: Lint history
5656
run: |
57-
npm install prettier
57+
npm install prettier@3
5858
npx prettier --write docs/history.md
5959
- name: Commit changes
6060
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
- id: isort
2424
args: ["--profile", "black", "--filter-files"]
2525
- repo: https://github.com/pre-commit/mirrors-prettier
26-
rev: v2.5.1
26+
rev: v3.1.0
2727
hooks:
2828
- id: prettier
2929
- repo: local

.prettierignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
Test*.yaml
1+
Test*.yaml
2+
docs/diagram/
3+
**/*.min.js
4+
**/*.min.css
5+
cumulusci/files/templates/

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sphinx:
2727
formats:
2828
- pdf
2929
- epub
30-
# Optionally declare the Python requirements required to build your docs
30+
# Optionally declare the Python requirements required to build your docs
3131
# python:
3232
# install:
3333
# - requirements: requirements_dev.txt

CODE_OF_CONDUCT.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ socioeconomic status, or other similar personal characteristics.
3535
Examples of behavior that contributes to creating a positive environment
3636
include:
3737

38-
* Using welcoming and inclusive language
39-
* Being respectful of differing viewpoints and experiences
40-
* Gracefully accepting constructive criticism
41-
* Focusing on what is best for the community
42-
* Showing empathy toward other community members
38+
- Using welcoming and inclusive language
39+
- Being respectful of differing viewpoints and experiences
40+
- Gracefully accepting constructive criticism
41+
- Focusing on what is best for the community
42+
- Showing empathy toward other community members
4343

4444
Examples of unacceptable behavior by participants include:
4545

46-
* The use of sexualized language or imagery and unwelcome sexual attention or
47-
advances
48-
* Personal attacks, insulting/derogatory comments, or trolling
49-
* Public or private harassment
50-
* Publishing, or threatening to publish, others' private information—such as
51-
a physical or electronic address—without explicit permission
52-
* Other conduct which could reasonably be considered inappropriate in a
53-
professional setting
54-
* Advocating for or encouraging any of the above behaviors
46+
- The use of sexualized language or imagery and unwelcome sexual attention or
47+
advances
48+
- Personal attacks, insulting/derogatory comments, or trolling
49+
- Public or private harassment
50+
- Publishing, or threatening to publish, others' private information—such as
51+
a physical or electronic address—without explicit permission
52+
- Other conduct which could reasonably be considered inappropriate in a
53+
professional setting
54+
- Advocating for or encouraging any of the above behaviors
5555

5656
## Our Responsibilities
5757

@@ -98,7 +98,7 @@ It includes adaptions and additions from [Go Community Code of Conduct][golang-c
9898

9999
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us].
100100

101-
[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/)
101+
[contributor-covenant-home]: https://www.contributor-covenant.org "https://www.contributor-covenant.org/"
102102
[golang-coc]: https://golang.org/conduct
103103
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
104104
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Please report any security issue to [security@salesforce.com](mailto:security@sa
44
as soon as it is discovered. This library limits its runtime dependencies in
55
order to reduce the total cost of ownership as much as can be, but all consumers
66
should remain vigilant and have their security stakeholders review all third-party
7-
products (3PP) like this one and their dependencies.
7+
products (3PP) like this one and their dependencies.

cumulusci/robotframework/tests/salesforce/labels.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Labels for testing</title>

cumulusci/tasks/push/README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# Push Upgrade API Scripts
22

3-
These scripts are designed to work with the Salesforce Push Upgrade API (in Pilot in Winter 16) which exposes new objects via the Tooling API that allow interacting with push upgrades in a packaging org. The main purpose of these scripts is to use the Push Upgrade API to automate push upgrades through Jenkins.
3+
These scripts are designed to work with the Salesforce Push Upgrade API (in Pilot in Winter 16) which exposes new objects via the Tooling API that allow interacting with push upgrades in a packaging org. The main purpose of these scripts is to use the Push Upgrade API to automate push upgrades through Jenkins.
44

55
# push_api.py - Python Wrapper for Push Upgrade API
66

7-
This python file provides wrapper classes around the Tooling API objects and abstracts interaction with them and their related data to make writing scripts easier. All the other scripts in this directory use the SalesforcePushApi wrapper to interact with the Tooling API.
7+
This python file provides wrapper classes around the Tooling API objects and abstracts interaction with them and their related data to make writing scripts easier. All the other scripts in this directory use the SalesforcePushApi wrapper to interact with the Tooling API.
88

99
Initializing the SalesforcePushApi wrapper can be done with the following python code:
1010

1111
push_api = SalesforcePushApi(sf_user, sf_pass, sf_serverurl)
1212

1313
You can also pass two optional keyword args to the initialization to control the wrapper's behavior
14-
15-
* **lazy**: A list of objects that should be lazily looked up. Currently, the only implementations for this are 'jobs' and 'subscribers'. If either are included in the list, they will be looked up on demand when needed by a referenced object. For example, if you are querying all jobs and subscribers is not set to lazy, all subscribers will first be retrieved. If lazy is enabled, subscriber orgs will only be retrieved when trying to resolve references for a particular job. Generally, if you have a lot of subscribers and only expect your script to need to lookup a small number of them, enabling lazy for subscribers will reduce api calls and cause the script to run faster.
1614

17-
* **default_where**: A dictionary with Push Upgrade API objects as key and a value containing a SOQL WHERE clause statement which is applied to all queries against the object to effectively set the universe for a given object. For example:
18-
15+
- **lazy**: A list of objects that should be lazily looked up. Currently, the only implementations for this are 'jobs' and 'subscribers'. If either are included in the list, they will be looked up on demand when needed by a referenced object. For example, if you are querying all jobs and subscribers is not set to lazy, all subscribers will first be retrieved. If lazy is enabled, subscriber orgs will only be retrieved when trying to resolve references for a particular job. Generally, if you have a lot of subscribers and only expect your script to need to lookup a small number of them, enabling lazy for subscribers will reduce api calls and cause the script to run faster.
16+
17+
- **default_where**: A dictionary with Push Upgrade API objects as key and a value containing a SOQL WHERE clause statement which is applied to all queries against the object to effectively set the universe for a given object. For example:
1918
default_where = {'PackageSubscriber': "OrgType = 'Sandbox'"}
2019

2120
In the example above, the wrapper would never return a PackageSubscriber which is not a Sandbox org.
@@ -24,36 +23,35 @@ In the example above, the wrapper would never return a PackageSubscriber which i
2423

2524
## Common Environment Variables
2625

27-
The push scripts are all designed to receive their arguments via environment variables. The following are common amongst all of the Push Scripts
26+
The push scripts are all designed to receive their arguments via environment variables. The following are common amongst all of the Push Scripts
2827

29-
* **SF_USERNAME**: The Salesforce username for the packaging org
30-
* **SF_PASSWORD**: The Salesforce password and security token for the packaging org
31-
* **SF_SERVERURL**: The login url for the Salesforce packaging org.
28+
- **SF_USERNAME**: The Salesforce username for the packaging org
29+
- **SF_PASSWORD**: The Salesforce password and security token for the packaging org
30+
- **SF_SERVERURL**: The login url for the Salesforce packaging org.
3231

3332
## get_version_id.py
3433

35-
Takes a namespace and version string and looks up the given version. Returns the version's Salesforce Id.
34+
Takes a namespace and version string and looks up the given version. Returns the version's Salesforce Id.
3635

3736
The script handles parsing the version number string into a SOQL query against the MetadataPackageVersion object with the correct MajorVersion, MinorVersion, PatchVersion, ReleaseState, and BuildNumber (i.e. Beta number).
3837

3938
### Required Environment Variables
4039

41-
* **NAMESPACE**: The Package's namespace prefix
42-
* **VERSION_NUMBER**: The version number string.
40+
- **NAMESPACE**: The Package's namespace prefix
41+
- **VERSION_NUMBER**: The version number string.
4342

4443
## orgs_for_push.py
4544

4645
Takes a MetadataPackageVersion Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line which can be fed into the schedule_push.py script.
4746

4847
### Required Environment Variables
4948

50-
* **VERSION**: The MetadataPackageVersion Id of the version you want to push upgrade. This is used to look for all users not on the version or a newer version
49+
- **VERSION**: The MetadataPackageVersion Id of the version you want to push upgrade. This is used to look for all users not on the version or a newer version
5150

5251
### Optional Environment Variables
5352

54-
* **SUBSCRIBER_WHERE**: An extra filter to be applied to all Subscriber queries. For example, setting this to OrgType = 'Sandbox' would find all Sandbox orgs eligible for push upgrade to the specified version
53+
- **SUBSCRIBER_WHERE**: An extra filter to be applied to all Subscriber queries. For example, setting this to OrgType = 'Sandbox' would find all Sandbox orgs eligible for push upgrade to the specified version
5554

5655
## failed_orgs_for_push.py
5756

58-
Takes a PackagePushRequest Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line for all orgs which failed the
59-
57+
Takes a PackagePushRequest Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line for all orgs which failed the

cumulusci/tasks/release_notes/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ Start the section with `# Critical Changes` followed by your content
1313
For example:
1414

1515
This won't be included
16-
16+
1717
# Critical Changes
18-
18+
1919
This will be included in Critical Changes
20-
20+
2121
## Changes
2222

23-
The Changes section is where you should list off any changes worth highlight to users in the release notes. This section should always include instructions for users for any post-upgrade tasks they need to perform to enable new functionality. For example, users should be told to grant permissions and add new CustomFields to layouts.
23+
The Changes section is where you should list off any changes worth highlight to users in the release notes. This section should always include instructions for users for any post-upgrade tasks they need to perform to enable new functionality. For example, users should be told to grant permissions and add new CustomFields to layouts.
2424

2525
Start the section with `# Changes` followed by your content
2626

2727
For example:
2828

2929
This won't be included
30-
30+
3131
# Changes
32-
32+
3333
This will be included in Changes
34-
34+
3535
## Issues Closed
3636

3737
The Issues Closed section is where you should link to any closed issues that should be listed in the release notes.
@@ -41,9 +41,9 @@ Start the section with `# Changes` followed by your content
4141
For example:
4242

4343
This won't be included
44-
44+
4545
# Issues Closed
46-
46+
4747
Fixes #102
4848
resolves #100
4949
This release closes #101
@@ -55,9 +55,9 @@ Would output:
5555
#100: Title of Issue 100
5656
#101: Title of Issue 101
5757
#102: Title of Issue 102
58-
58+
5959
A few notes about how issues are parsed:
6060

61-
* The parser uses the same format as Github: https://help.github.com/articles/closing-issues-via-commit-messages/
62-
* The parser searches for all issue numbers and sorts them by their integer value, looks up their title, and outputs a formatted line with the issue number and title for each issue.
63-
* The parser ignores everything else in the line that is not an issue number. Anything that is not an issue number will not appear in the rendered release notes
61+
- The parser uses the same format as Github: https://help.github.com/articles/closing-issues-via-commit-messages/
62+
- The parser searches for all issue numbers and sorts them by their integer value, looks up their title, and outputs a formatted line with the issue number and title for each issue.
63+
- The parser ignores everything else in the line that is not an issue number. Anything that is not an issue number will not appear in the rendered release notes

cumulusci/tasks/release_notes/tests/change_notes/full/example1.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ This is my pull request comment. Just explaining some stuff I did here, but shou
22

33
# Critical Changes
44

5-
* This will break everything!
5+
- This will break everything!
66

77
# Changes
88

99
Here's something I did. It was really cool
1010

1111
Oh yeah I did something else too!
1212

13-
1413
# Issues Closed
1514

1615
Fixed #2345 that was a real pain

0 commit comments

Comments
 (0)