Skip to content

Add labels to pull requests if configured#60

Open
martingtheodo wants to merge 3 commits intowilliamdclt:masterfrom
martingtheodo:add_labels
Open

Add labels to pull requests if configured#60
martingtheodo wants to merge 3 commits intowilliamdclt:masterfrom
martingtheodo:add_labels

Conversation

@martingtheodo
Copy link
Copy Markdown

No description provided.

Comment thread git-pretty-pull-request
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
Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Owner

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?

Copy link
Copy Markdown
Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants