-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add labels to pull requests if configured #60
base: master
Are you sure you want to change the base?
Conversation
git-pretty-pull-request
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.