-
-
Notifications
You must be signed in to change notification settings - Fork 707
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
github worflow format fix #2650
github worflow format fix #2650
Conversation
WalkthroughThe pull request modifies the GitHub Actions workflow in the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
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
🧹 Outside diff range and nitpick comments (2)
.github/workflows/pull-request.yml (2)
Line range hint
13-15
: Potential inconsistency in branch targeting configurationThe workflow allows PRs to all branches (
'**'
) but later enforcesdevelop-postgres
as the only valid target. Consider updating theon.pull_request.branches
configuration to explicitly list onlydevelop-postgres
to fail fast and provide clearer feedback.on: pull_request: branches: - - '**' + - 'develop-postgres'🧰 Tools
🪛 yamllint (1.35.1)
[error] 49-49: trailing spaces
(trailing-spaces)
Line range hint
25-27
: Consider improving error handling and job organizationThe formatting check is split into two steps with a failure condition. Consider combining them into a single step with better error handling:
- - name: Check formatting - if: steps.changed-files.outputs.only_changed != 'true' - run: npm run format:check - - - name: Run formatting if check fails - if: failure() - run: npm run format:fix + - name: Check and fix formatting + if: steps.changed-files.outputs.only_changed != 'true' + run: | + if ! npm run format:check; then + echo "::warning::Formatting issues detected, attempting to fix..." + npm run format:fix + # Check again after fixing to ensure all issues are resolved + npm run format:check + fiThis approach:
- Combines related steps for better readability
- Provides clearer feedback via GitHub Actions warning annotations
- Ensures formatting is correct after auto-fixing
Also applies to: 51-53
🧰 Tools
🪛 yamllint (1.35.1)
[error] 49-49: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pull-request.yml
(1 hunks)
🔇 Additional comments (1)
.github/workflows/pull-request.yml (1)
52-52
: Verify the format:fix script exists in package.json
The change to use npm run format:fix
is appropriate for auto-fixing format issues. However, let's ensure this script is properly defined.
✅ Verification successful
The format:fix
script is properly defined in package.json
The script exists and is correctly configured to run Prettier in write mode on TypeScript, JSON, SCSS, and CSS files, which is appropriate for auto-fixing formatting issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if format:fix script exists in package.json
jq '.scripts["format:fix"]' package.json
Length of output: 93
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #2650 +/- ##
=====================================================
- Coverage 95.19% 83.81% -11.39%
=====================================================
Files 295 312 +17
Lines 7036 8118 +1082
Branches 1516 1773 +257
=====================================================
+ Hits 6698 6804 +106
- Misses 132 1172 +1040
+ Partials 206 142 -64 ☔ View full report in Codecov by Sentry. |
a5c9d97
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
bug fix
Issue Number:
Fixes #2630
Summary
changed the run command for Run formatting if check fails
Does this PR introduce a breaking change?
NO
Have you read the contributing guide?
YES
Summary by CodeRabbit
develop-postgres
.