()
| 52 | |
| 53 | |
| 54 | def main(): |
| 55 | if len(sys.argv) > 1: |
| 56 | body = sys.argv[1] |
| 57 | else: |
| 58 | body = sys.stdin.read() |
| 59 | |
| 60 | # If the reserved keyword "NO_HISTORY" is included anywhere |
| 61 | # in the PR body, do not check it for validity |
| 62 | if "NO_HISTORY" in body: |
| 63 | return |
| 64 | |
| 65 | header_descriptions = parse_pr_body("NA", body) |
| 66 | if not header_descriptions: |
| 67 | raise ValueError(f"Unable to locate history annotation in PR body") |
| 68 | |
| 69 | print("HISTORY.md to be updated with the following additions:") |
| 70 | for header, descriptions in header_descriptions.items(): |
| 71 | print(f"\n{header}") |
| 72 | for line in descriptions: |
| 73 | print(line) |
| 74 | |
| 75 | |
| 76 | if __name__ == "__main__": |
no test coverage detected