To hardcode it you would add:
update_post_meta( $post_id, 'publish_post_category', $your_discourse_category_id );
WIth $your_discourse_category_id set to the Discourse category_id that you wish to publish to. But you shouldn’t have to do that. It should publish automatically to the default category that you have set on the Publishing tab. I’ll look at this some more.
Probably the easiest way to find the Discourse category_id is to go to your.forum.com/site.json and search for the categories array.