Conversation
… filtering - Add artifact-name-exclude-features input to action.yml (defaults to 'c-exports') - Implement filter_features() function in get-artifact-name.sh for exact-match filtering - Add comprehensive test suite with 6 scenarios covering edge cases - Document feature usage and behavior in README.MD
WalkthroughThe pull request introduces feature exclusion support for Rust artifact naming across the GitHub Action. It adds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/test-artifact-names.yml(1 hunks)README.MD(2 hunks)action.yml(2 hunks)scripts/get-artifact-name.sh(4 hunks)
🧰 Additional context used
🪛 GitHub Check: CodeQL
.github/workflows/test-artifact-names.yml
[warning] 317-433: Workflow does not contain permissions
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
- GitHub Check: test-artifact-names (false, armv7-unknown-linux-gnueabihf, armv7-unknown-linux-gnueabihf, armv7-u...
- GitHub Check: test-artifact-names (false, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu, aarch64-unknown...
- GitHub Check: test-specific-nightly
- GitHub Check: test-workspace-build-2
- GitHub Check: test-custom-rustflags
- GitHub Check: test-workspace-build
- GitHub Check: test-library-pgo
- GitHub Check: test-binary-pgo-with-library
- GitHub Check: test-binary-bundled (windows-latest, x86_64-pc-windows-msvc)
- GitHub Check: test-library-bundled (windows-latest, x86_64-pc-windows-msvc)
- GitHub Check: test-build-without-native-host-tools
- GitHub Check: test-binary-separate (macos-latest, aarch64-apple-darwin)
- GitHub Check: test-library-separate (windows-latest, x86_64-pc-windows-msvc)
- GitHub Check: test-pgo-with-cross-compile
- GitHub Check: test-library-separate (macos-latest, aarch64-apple-darwin)
- GitHub Check: test-binary-separate (windows-latest, x86_64-pc-windows-msvc)
🔇 Additional comments (5)
scripts/get-artifact-name.sh (1)
85-123: ✓ Sound filter_features implementation with proper edge-case handling.The function correctly implements exact-match filtering with whitespace trimming. Associative arrays (bash 4+) are appropriate for O(1) lookups. Early returns for empty inputs and proper quoting throughout maintain clarity and robustness.
README.MD (1)
300-313: ✓ Clear and accurate documentation of feature exclusion behavior.The examples correctly reflect the implementation (exact-match filtering, whitespace handling, empty list behavior). Default value rationale is well-explained.
action.yml (2)
111-114: ✓ Input parameter properly defined and positioned.Clear description, appropriate default value, and correct placement within the Artifact & Output Settings section.
267-270: ✓ Consistent parameter passing across all artifact types.All four artifact type calls (binary, binary-symbols, library, library-symbols) receive the exclude-features parameter with proper quoting.
.github/workflows/test-artifact-names.yml (1)
315-433: ✓ Comprehensive test coverage for feature exclusion scenarios.The six test cases systematically cover partial exclusion, complete exclusion, whitespace handling, empty exclude lists, exact-match behavior, and action.yml integration patterns. Test structure is clear and assertions are appropriate.
Summary by CodeRabbit
New Features
artifact-name-exclude-featuresinput to exclude specified features from artifact names while building them. Defaults to excluding "c-exports".Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.