-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Is it possible to create a pull request with a label? #1862
Comments
Yes it is - you need to have write access to the repository to apply the label though. You can use the issues API to set the label on the PR (PR's are also Issues, in API terms) |
@ryangribble thanks for the reply. Sorry but I am new to the package so not sure I fully understand you.
I am creating a pull request using
There is no |
In github API terms, a pull request is actually a special type of issue (you So you can actually use most of the issue API calls to do things to pull requests (get comments, set labels, milestones, assignees etc) so once you create the PR you can use the |
@ryangribble thanks again for the reply. Just to confirm that I understand you correctly. Once I have a PR e.g.
I guess the key is passing |
Yep! Let us know if you have any problems doing this You can also see the official mention of this in the github docs here: https://developer.github.com/v3/pulls/#labels-assignees-and-milestones |
what does owner mean here? gitHub.Issue.Update("owner", "repo name", pr.Number, issueUpdate); What value does it or it should hold? |
Is it possible to use issues to automatically assign a Project to a PR when it has an specific label? |
We have some system watching pull requests with specific labels; hence I am wondering whether it's possible to pragmatically create a pull request and attach a label to it?
The text was updated successfully, but these errors were encountered: