Skip to content

ci: fail lint job if prek fails - #1736

Merged
browniebroke merged 1 commit into
mainfrom
all-repos_autofix_ci/prek-failures
Aug 7, 2026
Merged

ci: fail lint job if prek fails#1736
browniebroke merged 1 commit into
mainfrom
all-repos_autofix_ci/prek-failures

Conversation

@browniebroke

@browniebroke browniebroke commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Committed via https://github.com/asottile/all-repos

Summary by Sourcery

CI:

  • Update lint workflow to record prek step outcome and explicitly fail the job if prek hooks fail, while always running the pre-commit lite action.

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the lint CI workflow so that pre-commit/prek failures still run auto-fixes but cause the lint job to fail afterward.

Flow diagram for updated lint CI prek failure handling

flowchart TD
    A[Run prek-action
continue-on-error true
id prek] --> B[Run pre-commit-ci/lite-action
if always]
    B --> C{steps.prek.outcome == 'failure'}
    C -->|yes| D[exit 1
Fail lint job]
    C -->|no| E[Lint job succeeds]
Loading

File-Level Changes

Change Details Files
Ensure prek/pre-commit failures cause the lint CI job to fail while still allowing the auto-fix step to run.
  • Assigns an explicit id to the prek action step so its outcome can be referenced in later steps.
  • Forces the pre-commit lite action to run regardless of previous step results by adding an if: always() condition.
  • Adds a final shell step that exits with a non-zero status when the prek step’s recorded outcome is failure, causing the job to fail.
.github/workflows/ci.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.92%. Comparing base (5de06d6) to head (d6efa61).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1736   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          37       37           
  Lines        1333     1333           
  Branches       71       71           
=======================================
  Hits         1332     1332           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@browniebroke
browniebroke merged commit fe18a8d into main Aug 7, 2026
21 checks passed
@browniebroke
browniebroke deleted the all-repos_autofix_ci/prek-failures branch August 7, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant