forked from mirrors/kingfisher
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style. - Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands. - Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only. - Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request. - Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
This commit is contained in:
parent
1b181a368a
commit
c3b675c132
1 changed files with 9 additions and 9 deletions
|
|
@ -9,10 +9,10 @@ use crate::{
|
|||
cli::{
|
||||
commands::{
|
||||
azure::AzureRepoSpecifiers,
|
||||
bitbucket::{BitbucketRepoSpecifiers, BitbucketRepoType},
|
||||
bitbucket::BitbucketRepoSpecifiers,
|
||||
gitea::GiteaRepoSpecifiers,
|
||||
github::{GitHubRepoSpecifiers, GitHubRepoType},
|
||||
gitlab::{GitLabRepoSpecifiers, GitLabRepoType},
|
||||
github::GitHubRepoSpecifiers,
|
||||
gitlab::GitLabRepoSpecifiers,
|
||||
huggingface::HuggingFaceRepoSpecifiers,
|
||||
inputs::{ContentFilteringArgs, InputSpecifierArgs},
|
||||
output::{OutputArgs, ReportOutputFormat},
|
||||
|
|
@ -207,7 +207,7 @@ impl ScanCommandArgs {
|
|||
scan_args.input_specifier_args.git_url = args.git_url;
|
||||
None
|
||||
}
|
||||
ScanInputCommand::Github(mut args) => {
|
||||
ScanInputCommand::Github(args) => {
|
||||
if args.specifiers.is_empty() {
|
||||
bail!(
|
||||
"Specify at least one --user, --org, or use --all-orgs when scanning GitHub"
|
||||
|
|
@ -231,7 +231,7 @@ impl ScanCommandArgs {
|
|||
None
|
||||
}
|
||||
}
|
||||
ScanInputCommand::Gitlab(mut args) => {
|
||||
ScanInputCommand::Gitlab(args) => {
|
||||
if args.specifiers.is_empty() {
|
||||
bail!(
|
||||
"Specify at least one --user, --group, or use --all-groups when scanning GitLab"
|
||||
|
|
@ -256,7 +256,7 @@ impl ScanCommandArgs {
|
|||
None
|
||||
}
|
||||
}
|
||||
ScanInputCommand::Gitea(mut args) => {
|
||||
ScanInputCommand::Gitea(args) => {
|
||||
if args.specifiers.is_empty() {
|
||||
bail!(
|
||||
"Specify at least one --user, --org, or use --all-orgs when scanning Gitea"
|
||||
|
|
@ -280,7 +280,7 @@ impl ScanCommandArgs {
|
|||
None
|
||||
}
|
||||
}
|
||||
ScanInputCommand::Bitbucket(mut args) => {
|
||||
ScanInputCommand::Bitbucket(args) => {
|
||||
if args.specifiers.is_empty() {
|
||||
bail!(
|
||||
"Specify at least one --user, --workspace, --project, or use --all-workspaces when scanning Bitbucket"
|
||||
|
|
@ -306,7 +306,7 @@ impl ScanCommandArgs {
|
|||
None
|
||||
}
|
||||
}
|
||||
ScanInputCommand::Azure(mut args) => {
|
||||
ScanInputCommand::Azure(args) => {
|
||||
if args.specifiers.is_empty() {
|
||||
bail!(
|
||||
"Specify at least one --organization, --project, or use --all-projects when scanning Azure DevOps"
|
||||
|
|
@ -330,7 +330,7 @@ impl ScanCommandArgs {
|
|||
None
|
||||
}
|
||||
}
|
||||
ScanInputCommand::Huggingface(mut args) => {
|
||||
ScanInputCommand::Huggingface(args) => {
|
||||
if args.specifiers.is_empty() {
|
||||
bail!(
|
||||
"Specify at least one --user, --org, --model, --dataset, or --space when scanning Hugging Face"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue