Skip to content

Add required-flag validation for GitLab contributor-count(AST-193575) - #1617

Open
cx-sumit-morchhale wants to merge 1 commit into
stagingfrom
bug/AST-193575
Open

cx-sumit-morchhale wants to merge 1 commit into
stagingfrom
bug/AST-193575

Conversation

@cx-sumit-morchhale

Copy link
Copy Markdown
Contributor

Summary

Fixed bug where cx utils contributor-count gitlab runs with no flags and silently returns "Total unique contributors 0" instead of requiring at least one flag.

Changes

  • Added validation to require at least one of --groups or --projects flags
  • Prevents silent fallback to user's projects when no flags provided
  • Aligns GitLab behavior with Azure and Bitbucket implementations
  • Clear error message: "Provide at least one group or project"

Test Plan

  • No flags provided → Returns error: "Provide at least one group or project"
  • With --projects flag → Works as expected
  • With --groups flag → Works as expected
  • With both flags → Returns error: "Projects and Groups both cannot be provided at the same time."
  • No regression in existing functionality

Related Issue

Fixes AST-193575

🤖 Generated with Claude Code

… command

- Add validation to require at least one of --groups or --projects flags
- Prevents silent fallback to user's projects when no flags provided
- Aligns GitLab behavior with Azure and Bitbucket implementations
- Clear error message: "Provide at least one group or project"

This fixes the bug where 'cx utils contributor-count gitlab' ran with no flags
and silently returned 0 contributors instead of requiring explicit scope.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@cx-sumit-morchhale
cx-sumit-morchhale requested a review from a team as a code owner November 18, 2026 06:11
@cx-sumit-morchhale cx-sumit-morchhale changed the title AST-193575: Add required-flag validation for GitLab contributor-count Add required-flag validation for GitLab contributor-count(AST-193575) Nov 18, 2026

This branch has not been deployed

No deployments
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