If a file is explicitly documented (or implied by the repo’s process) as auto-generated—such as changelog/history files—do not manually edit it in code changes. Instead, revert those edits and update the upstream inputs that drive generation (e.g., PR release-note metadata, templates, or generator configuration), then confirm the regenerated output contains the desired entry.
Example (what to do in PRs):
src/azure-cli/HISTORY.rst.