-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Alternative syntax for lab mr create #127
Comments
lab mr create
. [source, destination, title, assigned, description]lab mr create
. [source, destination, title, description]
lab mr create
. [source, destination, title, description]lab mr create
. [source, destination]
@jspreddy I'm just noticing the description of
This is actually no longer true, as of
Do you specifically need them as flags or is this just the result of poor documentation? In either case I'll for sure make sure to improve the docs for |
Yes, I did notice that it supported the target branch. The issue is that I need to specifically check out the source_branch in order to create a merge request to target_branch. I want to be able to create merge requests from a branch that is not currently checked out locally. I want to be able to specify both the source_branch and the target_branch. So that I can create merge requests without having to check out the branch locally. |
lab mr create
. [source, destination]lab mr create
. [source, target]
How would this syntax work for you?
It seems like this would be the most git-like way to support this functionality, which is the goal.
If that sounds good I can probably put it together this weekend and have it the next release |
Updates to the |
Sounds good. Can the remote be an optional param?
Or do you think that having remote in there is the better way to do this? |
Okay after actually going to implement this, I realize that the below, makes no damn sense..
The After looking at the
Ex
Ref:
The remote kinda has to be there since its the first positional arg and I don't think changing its a good idea. Largely because git enforces the contraints on it's commands |
Additional Thoughts, perhaps Implementing the above ( So, my alternate proposal is a new command to support a new usecase:
This makes both remotes settable and optional by default.
or explicitly
|
@jspreddy Any thoughts? |
Is the |
I assume that the remotes would have to be the same for both source and target branches. Is that not the case? Can the remotes be different? How does that work? |
The remotes can be different, consider the case where you fork a repo and want to create a merge request against the upstream. In my example, I'm referring to origin as some repo that's been forked by my user and creating an MR from my version to theirs |
Ah ok, got it. I was unaware of this feature in gitlab. I thought forking was only available in github. Turns out I was blind while in gitlab. :p Maybe because I have access to all my orgs' repos and could contribute directly to the repo, I was blind to the existence of fork. |
@jspreddy any thoughts on which approach to take? |
I like this approach but I am not sure about the new keyword. I think it is confusing especially since we have the create.
From what I understand from this thread, I think the requirements are somewhat like this: Variables and RequirementsConsidering the following variables:
Requirements for the above variables:
Scenarios:Scenario 1:Consider a scenario where Scenario 2:consider a scenario where Scenario 3:In the above scenario, if the user specified the source like |
Sorry if this is overwhelming. I am just trying to document the requirements so that we are on the same page. I want to help. |
Couple things of note
|
Thinking more and more that making @bmess You're an opinionated guy 😸 Any thoughts on these proposed changes to Proposed
with the following shorthand
Existing
|
@jspreddy I'm taking this out of the |
Yea, that is good. Don't want to rush things. Expecially since this is going to be a major change in the API. |
Got recently bit by this in #156 -- had an idea. Change Use arguments from earlier proposal
This should largely maintain legacy behavior while providing a more extensible API. |
lab mr create
. [source, target]
+1 on this issue The use-case I want is to create a standing 'staging->production' MR in my build via CI. Then when I am ready for a prod deploy, I just merge it and wait for the next staging build to recreate it. In order to do this, I need to:
|
@gtrak Did my previous comment with suggested behavior/syntax work for your first bullet? I'm not sure lab should be so clever to support the 2nd bullet within 1 command but that seems doable if you scripted it with a combination of commands. Lets chat a bit about it. |
I think your suggested syntax is fine for point 1. Re 2, that might be too esoteric of a need across users, so I'm happy to script it with multiple commands. I'm coming from phabricator/arcanist (which I actually dislike for a lot of reasons), but we did this with I guess it can be supported in gitlab much easier, by just resetting the source branch of an MR. |
AFAICT this issue was solved in version Would that cover the initial case of this issue? |
This feature has been implemented for quite some time already and since we had no feedback for my last comment I'm going to close it as "solved". But feel free to reopen it if needed. |
The
lab mr create
would be much more helpful if the following options are available.source_branch
target_branch
The text was updated successfully, but these errors were encountered: