Add labels to pull requests if configured#60
Add labels to pull requests if configured#60martingtheodo wants to merge 3 commits intowilliamdclt:masterfrom
Conversation
| hub pull-request -m "[${prefixes[i]}] $msg" -b ${branches[i]} -h $head | print_and_copy || true | ||
| else | ||
| hub pull-request -m "[${prefixes[i]}] $msg" -b ${branches[i]} -h $head -l "$label" | print_and_copy || true | ||
| fi |
There was a problem hiding this comment.
I'm not sure this is the right approach. I'm not a fan of where you set up the label (should be something like pretty-pull-request.labels rather than pretty-pull-request.some_branch), but mostly I'm not sure it should be handled in the configuration, there's just too many different use cases (different labels at each PR, different labels per branch...).
Why not just propagate the -l option? you could call git pretty-pull-request -l LABEL and we internally call hub pull-request -m "$msg" -b ${branches[i]} -h $head -l LABEL
There was a problem hiding this comment.
In general, we could propagate most options I suppose, except for -m, -b and -h that we set programmatically.
If you don't want to systematically call -l LABEL because you're always using the same label, you can set it in your git alias.
What do you think?
There was a problem hiding this comment.
I agree this is not the correct place to set up the labels, I would now prefer pretty-pull-requests.labels.some_branch
Maye propagate the options could be a good thing but it does not allow to have different labels for your different branches, what is I think a common use case
I think most of the PRs follow the standard workflow so use the same labels. But in other cases my method does not allow to use git pr and I do it manually, what should not be the case. I may correct that with an option --useLabel=true for example. What do you think ?
331d33e to
3a08fcc
Compare
No description provided.