#8 Checkout, auth. #16

Closed
kgorbunov wants to merge 104 commits from kgorbunov:dev into master
Showing only changes of commit 84b8f82ea1 - Show all commits

View File

@ -40,6 +40,24 @@ import (
// https://docs.github.com/ru/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
var initMsg = `
Pkgdashcli allows you to define a version update for a dependency and start
merge requests in version control systems.
Usage:
pkgdashcli --method {{method}} --path {{name of dep}}
Commands:
checkupdate | CheckUpdate collects a list of dependencies with the latest updates.
list | Returns a list of PR for this repository with update dependencies.
update --path {{name of one dep or empty for update all dep}} | Creates a PR with the specified dependency update in path or creates a PR with dependency updates for all modules if path is empty.
close --path {{name of one dep or empty for close all pr}} | Closes the PR for the specified dependency or closes all PRs with dependency updates if path is empty .
Flags:
--command | The command to execute
--path | The name of the module to create/close the PR, if empty, the command is executed for all modules.
`
var (
DefaultPullRequestTitle = `Bump {{.Name}} from {{.VersionOld}} to {{.VersionNew}}`
DefaultPullRequestBody = `Bumps {{.Name}} from {{.VersionOld}} to {{.VersionNew}}`
@ -146,6 +164,11 @@ func main() {
logger.Fatal(ctx, fmt.Sprintf("load cli cfg failed: %v", err))
}
if cliCfg.Path == "" && cliCfg.Method == "" {
logger.Info(ctx, initMsg)
return
}
path := "."
if len(os.Args) > 1 {
path = os.Args[1]