-
Notifications
You must be signed in to change notification settings - Fork 5
ci: auto lint/format fix in CI + test with bad formatting #172
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,11 +5,15 @@ on: | |||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||
| run_comfy_pr: | ||||||||||||||||||||||||||||||
| comfy_pr_test: | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||
| timeout-minutes: 10 | ||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| ref: ${{ github.head_ref }} | ||||||||||||||||||||||||||||||
| # setup comfy-cli | ||||||||||||||||||||||||||||||
| - uses: actions/setup-python@v5 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
|
|
@@ -30,6 +34,17 @@ jobs: | |||||||||||||||||||||||||||||
| # setup comfy-pr | ||||||||||||||||||||||||||||||
| # Run Comfy-PR Tests | ||||||||||||||||||||||||||||||
| - run: bun i | ||||||||||||||||||||||||||||||
| - run: bunx oxlint --fix | ||||||||||||||||||||||||||||||
| - run: bunx oxfmt --write | ||||||||||||||||||||||||||||||
| - name: Commit lint/format fixes | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||||||||||||||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||||||||||||||
| if ! git diff --quiet; then | ||||||||||||||||||||||||||||||
| git add -A | ||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
+44
|
||||||||||||||||||||||||||||||
| git commit -m "style: auto-fix lint and formatting" | ||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
+45
|
||||||||||||||||||||||||||||||
| git push | ||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+46
|
||||||||||||||||||||||||||||||
| - name: Commit lint/format fixes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if ! git diff --quiet; then | |
| git add -A | |
| git commit -m "style: auto-fix lint and formatting" | |
| git push | |
| - name: Check lint/format fixes | |
| run: | | |
| if ! git diff --quiet; then | |
| echo "Lint/formatting issues detected." | |
| echo "Please run 'bunx oxlint --fix' and 'bunx oxfmt --write' locally and commit the changes before pushing." | |
| exit 1 |
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.
The PR description mentions adding "intentionally bad formatting in lib/slack/index.ts to verify the auto-fix works", but this file is not included in the changes. To properly test the auto-fix functionality, you should include a file with formatting issues in the PR. Without this, the CI workflow changes cannot be verified to work as intended.