When quoting someone, is it proper to change "gotta" to "got to" without modifying the rest of the quote?
According to the NY Times Style Guide, the underlying principles of quoting someone are respect for the speaker and the accurate representation of their statement.
People often say things like “gotta” in place of “have got to”, and who can blame them?
However, if you’re going to clean this up grammatically for publication, it would be more respectful of the speaker to clean it up all the way. Leaving it in the halfway state of “I got to” takes away the power of the colloquial spoken form, but leaves the speaker sounding clumsy and inarticulate.
For many speakers, though, “I gotta try harder”, would accurately convey the emotional sense of what was said. Someone who loses a contest of some kind, and comes out with a vow to try again with more effort, deserves to have their sense of persistence conveyed to the reader. This also is a form of respect.
The Associated Press Stylebook (2018) has the following entry on "Quotations" under News Values on p.520:
Quotes must not be taken out of context. We do not alter quotations, even to correct grammatical errors or word usage. If a quotation is flawed because of grammar or lack of clarity, it may be paraphrased in a way that is completely true to the original quote. If a quote's meaning is too murky to be paraphrased accurately, it should not be used. Ellipses should be used rarely and must not alter the speaker's meaning.
So the journalist could paraphrase or omit the quote if they are unsure. Otherwise, they can leave it unaltered. Then, a paragraph later,
Use of regional dialects with nonstandard spellings should generally be limited to a writer's effort to convey a special tone or sense of place. In this case, as in interviews with a people not speaking their native language, it is especially important that their ideas be accurately conveyed. Always, we must be careful not to mock the people we quote.
The latter paragraph allows for slight wiggle room to represent an expression with "nonstandard spelling" in standard spelling. If "gotta" is equivalent to "got to," and "gonna" is equivalent to "going to," adjusting the spelling is allowed, but further alteration for grammar ("have got to" instead of "got to") isn't. Meanwhile, if gotta is important to capture the "tone or sense of place," use it unchanged.
So the possible responses of an AP writer would be to paraphrase the response and avoid the issue entirely, leave it unaltered (gotta), or adjust only the literal spelling to an obvious standard version (got to).
In general, you should not modify a quote. If someone said "gotta" then that's what you write, not a grammatically-corrected version. You do need to be careful to avoid implying that you are making fun of the person's mode of speech, though.
However, you can add a suffix "[sic]" (short for 'sic erat scriptum', 'thus was it written') to indicate that this is specifically what the quoted person said (or wrote), grammatical (or spelling) errors and all.
e.g. "The President tweeted 'I gotta get some covfefe'[sic]"