creating PR with labels and assignees

When looking at the API docs for pull requests labels and assignees are described as for issues.

With issues it’s possible to include  labels and assignees at creation and since every pull request is a issue I assumed the same could be done for PR creation.

But I’m not seeing labels or assignees after having created a pull request through the API. It would be nice to know if this is expected behaviour before I try all sorts of crazy things to make it work.

Anyone able to confirm whether you are anle to include  labels and assignees when creating pull requests through the API?

Hi @palmin,

Thanks for being here! Yes, you can use the request: IssueUpdate to update it and set labels or assignees.

For example:

var issueUpdate = new IssueUpdate();
issueUpdate.Labels.Add("some label");
// pass in pr.Number below
gitHub.Issue.Update("owner", "repo name", pr.Number, issueUpdate);

I hope this helps!

Perfect. This is the approach I will take.

Thank you.