Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: deploy detect default branch of repo if not set #1097

Closed
3 tasks done
KiaraGrouwstra opened this issue Aug 13, 2022 · 3 comments · Fixed by #3867
Closed
3 tasks done

CLI: deploy detect default branch of repo if not set #1097

KiaraGrouwstra opened this issue Aug 13, 2022 · 3 comments · Fixed by #3867
Labels
cli enhancement improve existing features

Comments

@KiaraGrouwstra
Copy link

Clear and concise description of the problem

woodpecker-cli deploy --help now tells us:

   --branch value            branch filter (default: "master")

the git community tho seems to have been moving from the name master to main.

Suggested solution

it would be nice if woodpecker allowed configuring the default branch (and update cli documentation) to reflect this.

Alternative

default to main over master

Additional context

related thread on gitea: #480

Validations

@anbraten
Copy link
Member

anbraten commented Aug 13, 2022

I would suggest that the command queries the repo endpoint first to get the default branch of a repo and uses that in case the user hasn't passed --branch. Was that what you suggested as well?

@KiaraGrouwstra
Copy link
Author

that sounds sane to me, yeah.
if that's already the present behavior then this may be mostly about how the cli documents the current situation.

@6543 6543 added enhancement improve existing features cli and removed pending:feature labels Aug 13, 2022
@KiaraGrouwstra KiaraGrouwstra changed the title make default branch variable make 'default branch' variable Oct 17, 2022
@6543 6543 changed the title make 'default branch' variable CLI: deploy detect default branch of repo if not set Nov 19, 2023
@anbraten
Copy link
Member

anbraten commented Jul 7, 2024

was solved by #3867

@anbraten anbraten closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli enhancement improve existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants