mirror of
https://github.com/thegeeklab/wp-git-action.git
synced 2024-06-02 18:29:41 +02:00
revert branch default handling
This commit is contained in:
parent
fbd0ab69ae
commit
1e36f94746
|
@ -46,12 +46,6 @@ func (p *Plugin) run(ctx context.Context) error {
|
|||
func (p *Plugin) Validate() error {
|
||||
var err error
|
||||
|
||||
// This default cannot be set in the cli flag, as the CI_* environment variables
|
||||
// can be set empty, resulting in an empty default value.
|
||||
if p.Settings.Repo.Branch == "" {
|
||||
p.Settings.Repo.Branch = "main"
|
||||
}
|
||||
|
||||
if p.Settings.Repo.WorkDir == "" {
|
||||
p.Settings.Repo.WorkDir, err = os.Getwd()
|
||||
}
|
||||
|
|
|
@ -141,6 +141,7 @@ func Flags(settings *Settings, category string) []cli.Flag {
|
|||
Usage: "name of the git source branch",
|
||||
EnvVars: []string{"PLUGIN_BRANCH"},
|
||||
Destination: &settings.Repo.Branch,
|
||||
Value: "main",
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
|
|
Loading…
Reference in New Issue
Block a user