Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Warn if branch not published #979

Open
penx opened this issue Mar 15, 2022 · 4 comments
Open

Warn if branch not published #979

penx opened this issue Mar 15, 2022 · 4 comments
Labels

Comments

@penx
Copy link

penx commented Mar 15, 2022

Describe the feature or problem you'd like to solve

If you try to run glab mr create on a branch that only exists locally, a merge request is created from a non existent branch with no changes.

Propose a Solution

Option to warn or block glab mr create if the branch doesn't exist on the remove.

@penx penx added the enhancement New feature or request label Mar 15, 2022
@zemzale
Copy link
Collaborator

zemzale commented Mar 15, 2022

Hi @penx

I guess we could show some kind of info text that nothing is pushed to the remote and it's an empty MR, but I don't think this is really needed since it's a completely valid thing to do in GitLab.

And if you want to push your current branch you can use the --push flag.

@penx
Copy link
Author

penx commented Mar 15, 2022

A warning would be great, for me due to me wrongly thinking I'd pushed a branch and then distributing the MR link with my team only to later be told the MR is blank 😄 (I've done this about 4 times over the past couple weeks! I'm used to hub which I think prevents a PR being created)

Yes I could start using --push by default instead...

Thanks for glab 🙂

@zemzale
Copy link
Collaborator

zemzale commented Mar 15, 2022

You can use an alias for this. I have one called mrc that does all the stuff I need for MR

You can do it like glab alias set mrc "mr create -a=@me --remove-source-branch --push

@clemsbot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

@clemsbot clemsbot added the stale label Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants