Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

martingtheodo
Copy link

No description provided.

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
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
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
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