Skip to content

Commit d1962c2

Browse files
johnbilliondesrosj
andauthored
Apply suggestions from code review
Co-authored-by: Jonathan Desrosiers <[email protected]>
1 parent fb82330 commit d1962c2

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/reusable-cleanup-pull-requests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# - Parse fixed ticket numbers from the commit message.
2020
# - Parse the SVN revision from the commit message.
2121
# - Searches for pull requests referencing any fixed tickets.
22-
# - Leaves a comment on each PR before closing.
22+
# - Comments on pull requests referencing any fixed tickets before closing.
2323
close-prs:
2424
name: Find and close PRs
2525
runs-on: ubuntu-24.04
@@ -43,7 +43,7 @@ jobs:
4343
COMMIT_MESSAGE="$(echo "$COMMIT_MSG_RAW" | sed -n '$p')"
4444
echo "svn_revision_number=$(echo "$COMMIT_MESSAGE" | sed -n 's/.*git-svn-id: https:\/\/develop.svn.wordpress.org\/[^@]*@\([0-9]*\) .*/\1/p')" >> "$GITHUB_OUTPUT"
4545
46-
- name: Find and close pull requests
46+
- name: Find, comment on, and close pull requests
4747
if: ${{ steps.trac-tickets.outputs.fixed_list != '' && steps.git-svn-id.outputs.svn_revision_number != '' }}
4848
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
4949
env:

.github/workflows/reusable-workflow-lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
#
3636
# This helps guard against supply chain attacks, unpinned dependencies, excessive permissions,
3737
# dangerous triggers, credential leaks, and sophisticated security vulnerabilities.
38+
#
39+
# Performs the following steps:
40+
# - Checks out the repository.
41+
# - Installs and configures uv.
42+
# - Runs a zizmor scan.
43+
# - Uploads the SARIF file to GitHub.
3844
zizmor:
3945
name: Zizmor
4046
runs-on: ubuntu-24.04

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ npm run test:php -- --group <group name or ticket number>
9999

100100
#### To lint the workflow files
101101

102-
GitHub Actions workflows operate in a privileged software supply chain environment, therefore the workflow files must be adhere to a high degree of quality and security standards.
102+
GitHub Actions workflows operate in a privileged software supply chain environment, therefore all workflow files must adhere to a high degree of quality and security standards.
103103

104-
The YAML workflow files in the `.github/workflows` directory are statically scanned during GitHub Actions workflow runs using [Actionlint](https://github.com/rhysd/actionlint) and [Zizmor](https://github.com/zizmorcore/zizmor). If you're making changes to those files then you can install both these tools locally using a package manager for your operating system and then run them to lint the files.
104+
All YAML workflow files within the `.github/workflows` directory are statically scanned when modified using [Actionlint](https://github.com/rhysd/actionlint) and [Zizmor](https://github.com/zizmorcore/zizmor). It's recommended that you install both of these tools locally using a package manager to run prior to submitting changes to workflow files.
105105

106106
- [Actionlint installations instructions](https://github.com/rhysd/actionlint/blob/main/docs/install.md)
107107
- [Zizmor installation instructions](https://docs.zizmor.sh/installation/)
@@ -112,13 +112,13 @@ To run Actionlint:
112112
actionlint
113113
```
114114

115-
To run Zizmor (note the trailing period):
115+
To run Zizmor for all workflow files (note the trailing period):
116116

117117
```
118118
zizmor .
119119
```
120120

121-
The linting that happens during GitHub Actions workflow runs is connected to GitHub Code Scanning, so linting errors won't cause workflow runs to fail directly. Some linting issues that are reported locally may be ignored in the Code Scanning settings.
121+
**Note:** A workflow run failure will not occur when issues are detected by Zizmor. Instead, the generated report is submitted to GitHub Code Scanning and surfaced through a status check. Some locally reported issues may be ignored based on the repository's configured Code Scanning settings.
122122

123123
#### Generating a code coverage report
124124
PHP code coverage reports are [generated daily](https://github.com/WordPress/wordpress-develop/actions/workflows/test-coverage.yml) and [submitted to Codecov.io](https://app.codecov.io/gh/WordPress/wordpress-develop).

0 commit comments

Comments
 (0)