feat(linting): add pre-commit reusable workflow#98
Merged
Conversation
Wraps github.com/stuttgart-things/dagger/linting@v0.115.0 `run-pre-commit`, so callers don't need Python / pre-commit / hook environments on the runner. Findings are exported to a file, displayed in the log, attached as an artifact, and added to the GitHub step summary. The dagger function masks pre-commit's real exit code with `|| true`, so the reusable inspects the captured text and fails when any hook line ends in `...Failed`. A `continue-on-error` input flips this to advisory. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
call-pre-commit.yamlreusable wrappinggithub.com/stuttgart-things/dagger/linting@v0.115.0run-pre-commit. Callers point at a repo +.pre-commit-config.yamland the dagger module supplies the Python/pre-commit/hook environments inside its container.|| true(always exits 0), the reusable inspects the text and fails when any line ends in...Failed. Acontinue-on-errorinput flips this to advisory mode.src,config-path,skip-hooks,output-file,dagger-version,linting-module-version,artifact-retention-days,runs-on,environment-name.First consumer is
stuttgart-things/crossplane-configurations(consumer PR to follow once this merges).Test plan
crossplane-configurationsviatask pre-commit(same dagger module + function + args).stuttgart-things/crossplane-configurationsonce this is onmain.Pre-commit Hooksjob ✓s in CI with all repo hooks passing.🤖 Generated with Claude Code