feat: list uncommitted files for git-dirty-check#2669
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe git-dirty-check composite action is enhanced to collect and display changed files in a collapsible PR comment section when uncommitted changes are detected. Additionally, the workflow trigger is updated to watch for changes in the composite actions directory. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment |
81c0e8d to
482a5cc
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
proto/wg/cosmo/common/common.proto (1)
25-25: Reconsider the enum naming for consistency and clarity.The enum value name
ERR_TEST_DIRTY_CHECKincludes "TEST" which breaks consistency with all other error codes in theEnumStatusCodeenum. Every other error code uses the patternERR_<DESCRIPTION>(e.g.,ERR_DEPLOYMENT_FAILED,ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL,ERR_BAD_REQUEST). Since this is for a production git-dirty-check feature, considerERR_DIRTY_CHECKorERR_GIT_DIRTY_CHECKto align with the existing enum pattern and avoid ambiguity about whether this is testing-only code.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@proto/wg/cosmo/common/common.proto` at line 25, Rename the enum value ERR_TEST_DIRTY_CHECK in EnumStatusCode to a production-appropriate name (e.g., ERR_DIRTY_CHECK or ERR_GIT_DIRTY_CHECK) to match the ERR_<DESCRIPTION> pattern; update the enum declaration in common.proto and then search & replace all references to ERR_TEST_DIRTY_CHECK across the codebase (including any generated code, switch/case statements, tests, and serialization/deserialization usage) to the new symbol to preserve compatibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/actions/git-dirty-check/action.yaml:
- Around line 15-19: The heredoc in the run step uses the static marker "EOF"
which can collide with file names; change the multiline GITHUB_OUTPUT write to
use a unique delimiter (e.g., generate a GUID or use a fixed unlikely token)
instead of "EOF": capture the output in FILES as before, create a unique
delimiter variable (DELIM), then write "files<<$DELIM" and terminate with
"$DELIM" when echoing to $GITHUB_OUTPUT so that FILES (and names containing EOF)
are preserved; update the run block that defines FILES and writes to
$GITHUB_OUTPUT accordingly.
In `@controlplane/src/core/bufservices/namespace/getNamespace.ts`:
- Around line 29-33: The snippet in getNamespace.ts has inconsistent indentation
for the lines calling namespaceRepo.byId and namespaceRepo.byName (they use 8
spaces instead of the project's 2-space style) and appears unrelated to the
git-dirty-check feature; fix by normalizing indentation to the project's 2-space
style around the if (req.id) block (adjust the lines calling
namespaceRepo.byId(req.id) and namespaceRepo.byName(req.name)), and if this
formatting change was unintentional, revert it so the PR only contains changes
relevant to adding uncommitted file listing to git-dirty-check; run the
repository's formatter/linter or the git-dirty-check locally before committing
to ensure no stray formatting changes remain.
---
Nitpick comments:
In `@proto/wg/cosmo/common/common.proto`:
- Line 25: Rename the enum value ERR_TEST_DIRTY_CHECK in EnumStatusCode to a
production-appropriate name (e.g., ERR_DIRTY_CHECK or ERR_GIT_DIRTY_CHECK) to
match the ERR_<DESCRIPTION> pattern; update the enum declaration in common.proto
and then search & replace all references to ERR_TEST_DIRTY_CHECK across the
codebase (including any generated code, switch/case statements, tests, and
serialization/deserialization usage) to the new symbol to preserve
compatibility.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b694fdec-0d10-477e-8e9b-962fc49c6642
📒 Files selected for processing (3)
.github/actions/git-dirty-check/action.yamlcontrolplane/src/core/bufservices/namespace/getNamespace.tsproto/wg/cosmo/common/common.proto
…iles-in-pr-comment
…iles-in-pr-comment
Summary by CodeRabbit
Checklist
List dirty files in the PR comment
