Repository navigation
feat: lint the changes of a push and accept a full provider configuration - #2
Merged
Merged
Conversation
…tion - A push event lints the files that the push changed. Before, it linted the whole working directory, which costs many model calls. - The provider-config input writes a complete provider configuration. Use it when a model needs aliases, capabilities, or default parameters. - An empty api-key with provider-endpoint skips the action. A Dependabot pull request has no access to secrets, for example. - The summary states the rule runs, the cached runs, and the tokens. - A Suggestion paragraph in a message becomes the suggestion of the finding. Co-authored-by: Neko Ayaka <neko@ayaka.moe> Co-authored-by: Arvin Xu <28616219+arvinxx@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most pull requests do not change the fixture. The changed-line scope finds nothing there, so the job did not run alint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
| Location | Rule | Finding | |
|---|---|---|---|
test/fixture/src/add.ts:2 |
fixture/no-fixme |
A FIXME note is in the changed code. 💡 Resolve the note or remove it. |
Commit e04f066 · run · 1 rule run, 0 cached · 0 input / 0 output tokens
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
This PR closes the gaps that a comparison with the LobeHub workflow found. It follows #1.
provider-configinput. It writes a complete provider configuration in TOML.provider-endpointwrites one model with no other properties, so a rule that requests a model by alias or by capability cannot resolve it, and a model cannot get default parameters such asthinking = { type = "disabled" }.provider-endpoint, an emptyapi-keyskips the action with a notice. A Dependabot pull request is not a fork, but it has no access to secrets.Suggestion:paragraph.js/no-mixed-layers-without-abstractionappends the suggestion to the message. The action moves it to the suggestion line.Behavior
pull_requestpushGET /compare/{before}...{after}.pushthat creates a branchpushthat deletes a branchModel resolution in
alinttreatssizeas a preference, so one model without a size resolves. A request by name and a required capability are hard conditions. That is whyprovider-endpointstays as it is andprovider-configcovers the other cases.Boundaries and risks
provider-configandprovider-endpointtogetherprovider-endpointprovider-config, which has no such condition.Verification
pnpm test:run: 21 tests passed. New cases cover a push, a new branch, an event without changes, theSuggestion:paragraph, and the cost line.pnpm lintandpnpm typecheck: passed.pnpm build:dist/index.mjsmatches the source.alint0.7.3:alint config models show fixture/fixture-modelprinted the alias, the capability, the size, and the default parameters from the file that the action writes.e2ejob writes the same configuration throughprovider-configand runs the same command. It now lints the whole fixture and checks the outputs, because a pull request that does not change the fixture has no findings on changed lines.🤖 Generated with Claude Code