'How to make AWS CodeBuild update a PR code?

I have a TypeScript project where I have a type coverage and a test coverage, and scripts allowing them to automatically update the thresholds of these when these get any higher. Right now, the git hooks I defined "ask" the person who pushes to manually re-push with the updated thresholds.

The project I'm working uses AWS CodeBuild as its CI. Is there a way to update these thresholds automatically, whenever there's a new PR opened and tested?

Ideally, in the case the thresholds can be higher, it would create a new commit inside the PR named "Raising coverage thresholds".



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source