Skip to content

Add developer management commands to CLI #4759

@batmat

Description

@batmat

What feature do you want to see added?

Add developer management commands to CLI

Problem

Following #4755, we still need to manually grep/edit YAML files to find and remove developers. We can add a subcommand to ease list.

Proposed Solution

Add developer search and developer remove commands building on the unified CLI.

Basic Usage

RPU_CLI="java -jar target/repository-permissions-updater-*-bin/repository-permissions-updater-*.jar"

# Find where a developer is listed
$RPU_CLI developer search someone
permissions/plugin-workflow-cps.yml
permissions/plugin-matrix-project.yml
permissions/component-jenkins-test-harness.yml

# Remove from specific files (supports globs)
$RPU_CLI developer remove someone --from permissions/plugin-workflow-cps.yml
$RPU_CLI developer remove someone --from 'permissions/plugin-*.yml'

# Remove from all found files (prompts for confirmation)
$RPU_CLI developer remove someone --all

Composable Workflow

The --chain flag makes search output pipeable to remove:

# Search with chainable output
$RPU_CLI developer search someone --chain
--from permissions/plugin-workflow-cps.yml --from permissions/plugin-matrix-project.yml

# Copy/edit output, then paste into remove command
$RPU_CLI developer remove someone --from permissions/plugin-workflow-cps.yml

# Or pipe directly
$RPU_CLI developer remove someone $($RPU_CLI developer search someone --chain)

Out of Scope (for now)

  • developer add command
  • Team management commands, etc.

Upstream changes

#4755

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions