I’m fairly certain it doesn’t. It takes it from the API userid and API key.
I just checked with one of my apps and I’m not passing a Username when creating a reply.
https://github.com/discourse/github-issues-to-discourse/blob/master/routes/api/discourse.js#L68-L73
Same with creating a topic:
https://github.com/discourse/github-issues-to-discourse/blob/master/lib/discourseCreateTopic/index.js
The only username it will have is based on the API username and key I provide.