-
-
Notifications
You must be signed in to change notification settings - Fork 196
ci: enable autofix.ci and pkg-pr-new workflows #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: a62bdd4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis update introduces several improvements and additions to the project's GitHub Actions workflows and package metadata. New workflow files are added for automated code formatting and publishing on any commit, while existing workflows are enhanced with clearer step names, explicit concurrency controls, and updated permissions. The release workflow now includes provenance metadata for npm packages. Additionally, the Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub
participant Workflow (autofix.ci)
participant Runner
participant autofix.ci Action
GitHub->>Workflow (autofix.ci): Trigger on PR opened/reopened/synchronized
Workflow (autofix.ci)->>Runner: Checkout repo, setup pnpm, setup Node.js, install deps
Runner->>Runner: Run code formatting script
Runner->>autofix.ci Action: Apply autofix.ci with fail-fast disabled
sequenceDiagram
participant GitHub
participant Workflow (pkg-pr-new)
participant Runner
GitHub->>Workflow (pkg-pr-new): Trigger on push or PR
Workflow (pkg-pr-new)->>Runner: Checkout repo, setup pnpm, setup Node.js, install deps
Runner->>Runner: Run pnpm dlx pkg-pr-new publish --compact
sequenceDiagram
participant GitHub
participant Workflow (release)
participant Runner
participant npm
GitHub->>Workflow (release): Trigger release workflow
Workflow (release)->>Runner: Checkout repo, setup pnpm, setup Node.js
Runner->>Runner: Run release script with NPM_CONFIG_PROVENANCE=true
Runner->>npm: Publish package with provenance metadata
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the CI/CD pipelines by adding concurrency controls, new workflows, and environment configuration for releases. It includes:
- Updated release workflow with concurrency and additional permissions, plus enabling NPM_CONFIG_PROVENANCE for releasing.
- Addition of a new pkg-pr-new workflow to publish any commit.
- Update of the autofix.ci workflow with appropriate naming and standardized steps.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
.github/workflows/release.yml | Added concurrency, permissions, and environment variables for release |
.github/workflows/pkg-pr-new.yml | New workflow for publishing any commit with similar concurrency settings |
.github/workflows/ci.yml | Synchronized checkout, pnpm, and Node.js setup actions |
.github/workflows/autofix.yml | New autofix workflow with checks and formatting steps |
Files not reviewed (1)
- package.json: Language not supported
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to a54d7fe in 53 seconds. Click for details.
- Reviewed
160
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
7
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/ci.yml:49
- Draft comment:
Step name 'Install ESLint ${{ matrix.node }}' is misleading since it installs ESLint based on matrix.eslint. Consider renaming to include the ESLint version. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. package.json:8
- Draft comment:
Verify that the format for 'maintainers' is compliant with npm standards; typically an object with 'name' and 'email' may be preferred. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify compliance with npm standards, which is against the rules. It doesn't provide a specific suggestion or point out a clear issue with the code.
3. .github/workflows/autofix.yml:1
- Draft comment:
Good: Workflow is correctly named 'autofix.ci' per security requirements. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. .github/workflows/ci.yml:34
- Draft comment:
Excellent use of pinned commit hashes (e.g., checkout@11bd71901bbe5b1630ceea73d27597364c9af683) for enhanced security. Ensure you update them periodically. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. .github/workflows/pkg-pr-new.yml:1
- Draft comment:
Review trigger events: The workflow triggers on both push and pull_request. Confirm that publishing on PR events is intentional to avoid accidental publishes from forks. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =30%
<= threshold50%
The comment is asking the author to confirm their intention regarding the workflow triggers. It suggests that publishing on PR events might lead to accidental publishes from forks, which is a valid concern. However, it violates the rule of not asking the PR author to confirm their intention. The comment could be rephrased to suggest a specific action or change instead of asking for confirmation.
6. .github/workflows/release.yml:46
- Draft comment:
NPM_CONFIG_PROVENANCE is enabled in the release workflow. Ensure its string 'true' is correctly interpreted and that its use is limited to release operations as intended. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
7. package.json:8
- Draft comment:
Switching from 'contributors' to 'maintainers' changes the project metadata. Verify this change meets your publication and attribution requirements. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the author to verify if the change meets certain requirements, which is against the rules. It doesn't provide a specific suggestion or point out a clear issue with the code.
Workflow ID: wflow_GeUyj2VKqbdWs9Xj
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/release.yml (2)
8-10
: Consider usinggithub.ref_name
for clearer concurrency grouping
The workflow correctly cancels in-progress runs, preventing duplicate releases. For improved readability (dropping therefs/heads/
prefix), you might switch the group to${{ github.workflow }}-${{ github.ref_name }}
.
12-15
: Principle of least privilege: Review unnecessary permissions
Explicit permissions are great for security. It appears theid-token
permission isn’t leveraged by this job. Please verify its necessity and remove it if not required.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.changeset/wise-houses-build.md
(1 hunks).github/workflows/autofix.yml
(1 hunks).github/workflows/ci.yml
(1 hunks).github/workflows/pkg-pr-new.yml
(1 hunks).github/workflows/release.yml
(2 hunks)package.json
(1 hunks)
🔇 Additional comments (24)
package.json (1)
8-10
: Field update looks correct
Thecontributors
field was properly replaced withmaintainers
, and the new entry format aligns with npm’s expected syntax..changeset/wise-houses-build.md (1)
1-6
: Changeset front-matter is valid
The YAML header correctly specifies a patch foreslint-plugin-prettier
, and the summary clearly describes enablingNPM_CONFIG_PROVENANCE
..github/workflows/ci.yml (1)
34-41
: Pinned actions and explicit step names improve reproducibility
The checkout, pnpm setup, and Node.js setup steps are now explicitly named and pinned to specific commit SHAs, which enhances clarity and ensures consistent CI behavior..github/workflows/autofix.yml (9)
1-1
: Workflow name meets security requirement
Naming the workflowautofix.ci
satisfies the security constraint for the autofix.ci action.
3-9
: Trigger configuration looks correct
The workflow triggers on pull request opened, reopened, and synchronize events as intended.
10-13
: Concurrency group prevents overlapping runs
Grouping by${{ github.workflow }}-${{ github.ref }}
withcancel-in-progress: true
ensures only the latest run per branch is active.
18-19
: Checkout step is correctly pinned
Usingactions/checkout
at a specific SHA maintains reproducibility.
21-22
: pnpm setup step is consistent
The pnpm setup action is pinned and named, aligning with other workflows.
24-28
: Node.js LTS setup is clear and cached
Usinglts/*
with pnpm cache ensures tests run on the latest LTS release with dependency caching.
30-31
: Install step uses frozen lockfile
pnpm install --prefer-frozen-lockfile
enforces lockfile integrity.
33-34
: Format step aligns with project scripts
Runningpnpm format
ensures code style is applied before autofix.
36-39
: Autofix action is properly configured
Theautofix-ci/action
pin andfail-fast: false
option are set correctly for non-blocking autofixes..github/workflows/pkg-pr-new.yml (8)
1-1
: Workflow name clearly describes purpose
Publish Any Commit
accurately reflects the intent to run the pkg-pr-new publish command on every commit.
2-5
: Event triggers cover both push and PR
Listening on bothpush
andpull_request
ensures the publishing step runs in relevant contexts.
6-8
: Concurrency safeguards are in place
The same concurrency pattern as other workflows prevents redundant runs for the same branch.
15-17
: Pinned checkout action
Consistent use of the same checkout SHA across workflows maintains CI stability.
18-20
: pnpm setup is uniform
The pnpm action pin matches other workflows, reducing configuration drift.
21-25
: Node.js setup follows established pattern
Usinglts/*
and cache reflects best practices for GitHub Actions speed and reliability.
27-28
: Dependency installation is reliable
pnpm install --prefer-frozen-lockfile
prevents unexpected lockfile changes.
30-31
: Publish step invokes pkg-pr-new correctly
Thepnpm dlx pkg-pr-new publish --compact
command is properly configured to produce concise output..github/workflows/release.yml (4)
22-23
: Good practice: Pinning the checkout action by SHA
Lockingactions/checkout
to a specific commit enhances reproducibility and security.
25-26
: Pinned pnpm setup action ensures stability
Using the SHA forpnpm/action-setup
(v4.1.0) guarantees consistent behavior across runs.
28-29
: Pin Node.js setup action for consistency
Lockingactions/setup-node
to a known SHA (v4.4.0) is a solid practice to avoid unexpected changes.
46-46
: Enable npm provenance metadata
SettingNPM_CONFIG_PROVENANCE: true
aligns with best practices to record package provenance.
| datasource | package | from | to | | ---------- | ---------------------- | ----- | ----- | | npm | eslint-plugin-prettier | 5.2.3 | 5.3.1 | ## [v5.3.1](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#531) ##### Patch Changes - [#734](prettier/eslint-plugin-prettier#734) [`dcf2c80`](prettier/eslint-plugin-prettier@dcf2c80) Thanks [@JounQin](https://github.com/JounQin)! - ci: enable `NPM_CONFIG_PROVENANCE` env ## [v5.3.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#530) ##### Minor Changes - [#674](prettier/eslint-plugin-prettier#674) [`6fe0c90`](prettier/eslint-plugin-prettier@6fe0c90) Thanks [@irsooti](https://github.com/irsooti)! - feat(types): prefer `Config` over `FlatConfig` when they're equal ## [v5.2.6](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#526) ##### Patch Changes - [#723](prettier/eslint-plugin-prettier#723) [`1451176`](prettier/eslint-plugin-prettier@1451176) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): bump `synckit` to `v0.11.0` ## [v5.2.5](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#525) ##### Patch Changes - [#721](prettier/eslint-plugin-prettier#721) [`4f5513d`](prettier/eslint-plugin-prettier@4f5513d) Thanks [@JounQin](https://github.com/JounQin)! - fix: clarify correct `eslint-config-prettier` peer range ## [v5.2.4](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#524) ##### Patch Changes - [#715](prettier/eslint-plugin-prettier#715) [`b8cfe56`](prettier/eslint-plugin-prettier@b8cfe56) Thanks [@JounQin](https://github.com/JounQin)! - chore: hourcekeeping, bump all (dev) deps
| datasource | package | from | to | | ---------- | ---------------------- | ----- | ----- | | npm | eslint-plugin-prettier | 5.2.3 | 5.3.1 | ## [v5.3.1](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#531) ##### Patch Changes - [#734](prettier/eslint-plugin-prettier#734) [`dcf2c80`](prettier/eslint-plugin-prettier@dcf2c80) Thanks [@JounQin](https://github.com/JounQin)! - ci: enable `NPM_CONFIG_PROVENANCE` env ## [v5.3.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#530) ##### Minor Changes - [#674](prettier/eslint-plugin-prettier#674) [`6fe0c90`](prettier/eslint-plugin-prettier@6fe0c90) Thanks [@irsooti](https://github.com/irsooti)! - feat(types): prefer `Config` over `FlatConfig` when they're equal ## [v5.2.6](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#526) ##### Patch Changes - [#723](prettier/eslint-plugin-prettier#723) [`1451176`](prettier/eslint-plugin-prettier@1451176) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): bump `synckit` to `v0.11.0` ## [v5.2.5](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#525) ##### Patch Changes - [#721](prettier/eslint-plugin-prettier#721) [`4f5513d`](prettier/eslint-plugin-prettier@4f5513d) Thanks [@JounQin](https://github.com/JounQin)! - fix: clarify correct `eslint-config-prettier` peer range ## [v5.2.4](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#524) ##### Patch Changes - [#715](prettier/eslint-plugin-prettier#715) [`b8cfe56`](prettier/eslint-plugin-prettier@b8cfe56) Thanks [@JounQin](https://github.com/JounQin)! - chore: hourcekeeping, bump all (dev) deps
| datasource | package | from | to | | ---------- | ---------------------- | ----- | ----- | | npm | eslint-plugin-prettier | 5.2.3 | 5.4.0 | ## [v5.4.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#540) ##### Minor Changes - [#736](prettier/eslint-plugin-prettier#736) [`59a0cae`](prettier/eslint-plugin-prettier@59a0cae) Thanks [@yashtech00](https://github.com/yashtech00)! - refactor: migrate `worker.js` to `worker.mjs` ## [v5.3.1](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#531) ##### Patch Changes - [#734](prettier/eslint-plugin-prettier#734) [`dcf2c80`](prettier/eslint-plugin-prettier@dcf2c80) Thanks [@JounQin](https://github.com/JounQin)! - ci: enable `NPM_CONFIG_PROVENANCE` env ## [v5.3.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#530) ##### Minor Changes - [#674](prettier/eslint-plugin-prettier#674) [`6fe0c90`](prettier/eslint-plugin-prettier@6fe0c90) Thanks [@irsooti](https://github.com/irsooti)! - feat(types): prefer `Config` over `FlatConfig` when they're equal ## [v5.2.6](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#526) ##### Patch Changes - [#723](prettier/eslint-plugin-prettier#723) [`1451176`](prettier/eslint-plugin-prettier@1451176) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): bump `synckit` to `v0.11.0` ## [v5.2.5](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#525) ##### Patch Changes - [#721](prettier/eslint-plugin-prettier#721) [`4f5513d`](prettier/eslint-plugin-prettier@4f5513d) Thanks [@JounQin](https://github.com/JounQin)! - fix: clarify correct `eslint-config-prettier` peer range ## [v5.2.4](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#524) ##### Patch Changes - [#715](prettier/eslint-plugin-prettier#715) [`b8cfe56`](prettier/eslint-plugin-prettier@b8cfe56) Thanks [@JounQin](https://github.com/JounQin)! - chore: hourcekeeping, bump all (dev) deps
| datasource | package | from | to | | ---------- | ---------------------- | ----- | ----- | | npm | eslint-plugin-prettier | 5.2.3 | 5.4.0 | ## [v5.4.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#540) ##### Minor Changes - [#736](prettier/eslint-plugin-prettier#736) [`59a0cae`](prettier/eslint-plugin-prettier@59a0cae) Thanks [@yashtech00](https://github.com/yashtech00)! - refactor: migrate `worker.js` to `worker.mjs` ## [v5.3.1](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#531) ##### Patch Changes - [#734](prettier/eslint-plugin-prettier#734) [`dcf2c80`](prettier/eslint-plugin-prettier@dcf2c80) Thanks [@JounQin](https://github.com/JounQin)! - ci: enable `NPM_CONFIG_PROVENANCE` env ## [v5.3.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#530) ##### Minor Changes - [#674](prettier/eslint-plugin-prettier#674) [`6fe0c90`](prettier/eslint-plugin-prettier@6fe0c90) Thanks [@irsooti](https://github.com/irsooti)! - feat(types): prefer `Config` over `FlatConfig` when they're equal ## [v5.2.6](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#526) ##### Patch Changes - [#723](prettier/eslint-plugin-prettier#723) [`1451176`](prettier/eslint-plugin-prettier@1451176) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): bump `synckit` to `v0.11.0` ## [v5.2.5](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#525) ##### Patch Changes - [#721](prettier/eslint-plugin-prettier#721) [`4f5513d`](prettier/eslint-plugin-prettier@4f5513d) Thanks [@JounQin](https://github.com/JounQin)! - fix: clarify correct `eslint-config-prettier` peer range ## [v5.2.4](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#524) ##### Patch Changes - [#715](prettier/eslint-plugin-prettier#715) [`b8cfe56`](prettier/eslint-plugin-prettier@b8cfe56) Thanks [@JounQin](https://github.com/JounQin)! - chore: hourcekeeping, bump all (dev) deps
| datasource | package | from | to | | ---------- | ---------------------- | ----- | ----- | | npm | eslint-plugin-prettier | 5.2.3 | 5.4.0 | ## [v5.4.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#540) ##### Minor Changes - [#736](prettier/eslint-plugin-prettier#736) [`59a0cae`](prettier/eslint-plugin-prettier@59a0cae) Thanks [@yashtech00](https://github.com/yashtech00)! - refactor: migrate `worker.js` to `worker.mjs` ## [v5.3.1](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#531) ##### Patch Changes - [#734](prettier/eslint-plugin-prettier#734) [`dcf2c80`](prettier/eslint-plugin-prettier@dcf2c80) Thanks [@JounQin](https://github.com/JounQin)! - ci: enable `NPM_CONFIG_PROVENANCE` env ## [v5.3.0](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#530) ##### Minor Changes - [#674](prettier/eslint-plugin-prettier#674) [`6fe0c90`](prettier/eslint-plugin-prettier@6fe0c90) Thanks [@irsooti](https://github.com/irsooti)! - feat(types): prefer `Config` over `FlatConfig` when they're equal ## [v5.2.6](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#526) ##### Patch Changes - [#723](prettier/eslint-plugin-prettier#723) [`1451176`](prettier/eslint-plugin-prettier@1451176) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): bump `synckit` to `v0.11.0` ## [v5.2.5](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#525) ##### Patch Changes - [#721](prettier/eslint-plugin-prettier#721) [`4f5513d`](prettier/eslint-plugin-prettier@4f5513d) Thanks [@JounQin](https://github.com/JounQin)! - fix: clarify correct `eslint-config-prettier` peer range ## [v5.2.4](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#524) ##### Patch Changes - [#715](prettier/eslint-plugin-prettier#715) [`b8cfe56`](prettier/eslint-plugin-prettier@b8cfe56) Thanks [@JounQin](https://github.com/JounQin)! - chore: hourcekeeping, bump all (dev) deps
NPM_CONFIG_PROVENANCE
env is enabled for releasingImportant
Add new GitHub workflows for autofix and commit publishing, update existing workflows, and modify
package.json
maintainers field.autofix.yml
for automatic code formatting on pull requests.pkg-pr-new.yml
for publishing any commit on push or pull request.ci.yml
to include named steps for better clarity.release.yml
to include concurrency settings and permissions, and setNPM_CONFIG_PROVENANCE
to true.contributors
field tomaintainers
.This description was created by
for a54d7fe. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit